Slide

  • LINUX

    LINUX:In 1969 AT&T made a decision to withdraw Multics and go with GECOS (General Electric Comprehensive Operating Supervisor / System), with AT & T in Bells Lab when Multics was withdrawn some of the programmers named Ken Thompson and Dennis Ritchie decided to rewrite operating system in order to support low cost computer..To Know More

    CLICK HERE

  • MICROSOFT

    MICROSOFT:Microsoft was established to develop and sell BASIC interpreters for the Altair 8800. It rose to dominate the home computer operating system market with MS-DOS in the mid-1980s,followed by the Microsoft Windows line of operating systems. To Know More

    CLICK HERE

  • CISCO

    CISCO:During the early 1980s, there was a married couple namely Len and Sandy Bosack who used to work in two different departments of computer located in Stanford University. This couple was facing problem in making their computers communicate with each other To Know More

    CLICK HERE

showinfo=1

Network Configuration


Network Configuration.

IP Addressing
An IP address is a numeric identifier assigned to each machine on an IP network. It designates the specific location of a device on the network.
We can assign IP Address to computer by using two methods
1.     Static [ Manually ]
2.     Dynamic [ Using DHCP Server ]

There are three methods for depicting IP Addresses
1. Dotted Decimal   :- 10.2.11.10
2. Binary :- 00001010.00000010.00001011.00001010

3. Hexa-Decimal :- A.2.B.A 


IP Address Classes :-
Classes        IP Range      Octet        Network ID / Host ID 
Class A        0-127          8.8.8.8       N.H.H.H
Class B        128-191      8.8.8.8       N.N.H.H
Class C192-223              8.8.8.8       N.N.N.H
Class D        224-239      8.8.8.8       N.N.N.N
Class E240-255              8.8.8.8       N.N.N.N

1. To view IP Address.
[root@server1 ~]#ifconfig      

2. To set IP Address.
[root@server1 ~]#setup                      

1. Under Choose a Tool Dialog Box select Network configuration and press ENTER
2. Under Select Action Dialog Box select Device configuration and press ENTER
3. Under Select A Device Dialog Box select eth0 (eth0) – Ethernet and press ENTER
4. Under Network Configuration Dialog Box add following entries
Name                           eth0
Device                         eth0
Use DHCP                  [*]                               
Static IP                                                           This setting is applicable if DHCP server is    
Netmask                                                          configured and machine will get IP from it
Default gateway IP                                         or else you need to set static IP for a machine
Primary DNS Server 
Secondary DNS Server

Name                           eth0
Device                         eth0
Use DHCP                  []                                          to uncheck * press spacebar and set static IP.             
Static IP                      10.0.0.1                                   for a machine use this settings.           
Netmask                      255.0.0.0                                
Default gateway IP
Primary DNS Server 
Secondary DNS Server

Select on Ok and press ENTER.
5. Select Save and press ENTER.
6. Select Save&Quit and press ENTER
7. SelectQuit and press ENTER
[root@server1 ~]#ifconfig                                          
[root@server1 ~]#service network restart                   
[root@server1 ~]#ping  10.0.0.1                               

3. To add another Ethernet id and set IP for it.
[root@server1 ~]#setup                                              
1. Under Choose a Tool Dialog Box select Network configuration and press ENTER
2. Under Select Action Dialog Box select Device configuration and press ENTER
3. Under Select A Device Dialog Box select and press ENTER
4. Under Network Configuration select Ethernet and press ENTER or select ADD
Now set Ethernet device name and IP address

Name                           eth1
Device                         eth1
Use DHCP                  []                                  to uncheck * press spacebar and set static IP.             
Static IP                      10.0.0.10                     for a machine use this settings.           
Netmask                      255.0.0.0                                
Default gateway IP
Primary DNS Server 

Select on Ok and press ENTER.
5. Select Save and press ENTER.
6. Select Save&Quit and press ENTER
7. SelectQuit and press ENTER
[root@server1 ~]#ifconfig                                         
[root@server1 ~]#service network restart                    
[root@server1 ~]#ping  10.0.0.1                                 

3. To view network configuration file.
[root@server1 ~]#cat  /etc/sysconfig/network-scripts/ifcfg-eth0                   
DEVICE=eth0
NM_CONTROLLED=yes
ONBOOT=yes
IPADDR=10.0.0.1
BOOTPROTO=none
NETMASK=255.0.0.0
TYPE=Ethernet
IPV6INIT=no
USERCTL=no
HWADDR=00:0C:29:E4:E8:D4
PREFIX=8
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
NAME=”System eth0”
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03

4. To change hostname of a computer using file.
[root@server1 ~]#cat  /etc/sysconfig/network                         
NETWORKING=yes
HOSTNAME=server1

5. To change IP address temporary.
[root@server1 ~]#ifconfig                                                       
eth2     inet addr : 100.0.0.1 Bcast: 100.255.255.255  Mask: 255.0.0.0

[root@server1 ~]#ifconfig  eth2  20.0.0.1                             
[root@server1 ~]#ifconfig                                                      
eth2     inet addr : 20.0.0.1 Bcast: 20.255.255.255  Mask: 255.0.0.0

[root@server1 ~]#service network restart                         
[root@server1 ~]#ifconfig                                                           
eth2     inet addr : 100.0.0.1 Bcast: 100.255.255.255  Mask: 255.0.0.0                       
                                                                                                                               
5. To create temporary alternate IP address .         
[root@server1 ~]#ifconfig                                                       
eth2     inet addr : 100.0.0.1 Bcast: 100.255.255.255  Mask: 255.0.0.0
[root@server1 ~]#ifconfig  eth2:0  20.0.0.1      
[root@server1 ~]#ifconfig                                 
eth2:0    inet addr : 20.0.0.1 Bcast: 20.255.255.255  Mask: 255.0.0.0
[root@server1 ~]#service network restart      
[root@server1 ~]#ifconfig                            

6. To create permanent alternate IP address temporary.
[root@server1 ~]#cd  /etc/sysconfig/network-scripts             
[root@server1 network-scripts]#vi  ifcfg-eth2:0
DEVICE=eth0:0
ONBOOT=yes
IPADDR=200.0.0.1
BOOTPROTO=static
NETMASK=255.0.0.0
TYPE=Ethernet
NM_CONTROLLED=no
:wq!
[root@server1 network-scripts]#service network restart         
[root@server1 network-scripts]#ifconfig                                

Note:- Whenever you assign temporary ip address or temporary lan card after you restart the network services the temporary settings will disappear.  




VI editor Tutorial


VI Editor
 1. Command Mode :- In this mode you can edit  the files using basic commands.
2. Insert Mode :- In this mode you can edit the file normally.
3. ESC Mode :- this mode is used to escape from certain mode. Eg. Escape from insert mode and go to command mode.

Command Mode Commands
1. x                  To delete the character.
2. alt+u                        To undo the changes.
3. $                  To take the cursor end of the line.
4. ^                  To take the cursor start of the line.
5. {                  To take the cursor start of the paragraph.
6. }                  To take the cursor end of the paragraph.
7. (                   To take the cursor start of the sentence.
8. )                   To take the cursor end of the sentence.
9. w                 To take the cursor next word.
10. b                To take the cursor back word.
11. k                Used for up arrow key.
12. j                 Used for down arrow key.
13. h                Used for left  arrow key.
14. l                 Used for right arrow key.
15. yy              To copy a specific no.’s of lines.
16.p                 To paste copied lines.
17. dd              To delete specific no.’s of lines.
18. shift+r or R            To replace the line
19. r                 To replace the character.
20. o                To create a blank line below the cursor.
21. O               To create a blank line above the cursor.
22. i               Go to Insert mode
23. :q               To exit without saving the file.
24. :q!              To exit without saving the file forcefully.
25. :wq                        To save and exit the file.
26. :wq!           To save and exit the file forcefully.
27. :se nu          To see numbers
28:  :se no nu      To remove numbers


VI editor Tutorial
1. To create file using VI
[root@server1~]# vi  filename                ………
to inter into insert mode and type the following text in it

Hello!!!!!!!!
Good Morning Everyone
Welcome to CMS Computer Institute

  ESC>                                 ………. TO EXIT FROM INSERT MODE
:wq!                                                    ……… TO SAVE AND EXIT
[root@server1~]# cat filename
Hello!!!!!!!!
Good Morning Everyone
Welcome to CMS Computer Institute

2. To Copy and Paste the lines using Vi editor
[root@server1~]# vi  filename         ………
Hello!!!!!!!!
Good Morning Everyone                                 [ move your cursor to specific line which you want to copy and type yy and move your cursor were you want to paste that line
Welcome to CMS Computer Institute              and type p ]
Good Morning Everyone

PRESS  ESC>                                      ………. TO EXIT FROM INSERT MODE
:wq!                                                        ……… TO SAVE AND EXIT
[root@server1~]#

3. To Delete the lines using Vi editor
[root@server1~]# vi  filename                   ………
Hello!!!!!!!!
Good Morning Everyone                               [ move your cursor to specific line which you want to delete and type dd ]
Welcome to CMS Computer Institute              
Good Morning Everyone

PRESS  ESC>                                  ………. TO EXIT FROM INSERT MODE
:wq!                                                   ……… TO SAVE AND EXIT
[root@server1~]#

4. Move the Cursor end of the line.
[root@server1~]# vi  filename         ………


Hello!!!!!!!!
Good Morning Everyone                                [ take your cursor start of the line and type shift+$ to move end on the line]
Welcome to CMS Computer Institute

  ESC>                                 ………. TO EXIT FROM INSERT MODE
:wq!                                                     ……… TO SAVE AND EXIT

5. Move the Cursor  start of the line.
[root@server1~]# vi  filename         ………

Hello!!!!!!!!
Good Morning Everyone                                 [ take your cursor start of the line and type shift+^ to move start on the line]
Welcome to CMS Computer Institute

  ESC>                            ………. TO EXIT FROM INSERT MODE
:wq!                                                ……… TO SAVE AND EXIT

6. Move the Cursor end of the paragraph.
[root@server1~]# vi  filename         ………


Hello!!!!!!!!
Good Morning Everyone                               [  take your cursor start of the line and type shift+} to move end on the paragraph ]
Welcome to CMS Computer Institute

  ESC>                             ………. TO EXIT FROM INSERT MODE
:wq!                                                ……… TO SAVE AND EXIT

7. Move the Cursor  start of the paragraph.
[root@server1~]# vi  filename         ………

Hello!!!!!!!!
Good Morning Everyone                                [ take your cursor end of the paragraph and type shift+{ to move start of the paragraph ]
Welcome to CMS Computer Institute

  ESC>                                ……….
:wq!                                                  ………

To replace the character.
[root@server1~]#vi  filename                         [ move your cursor to specific word which you want to
Welcome to CSS                                              replace             and press r and do the changes ]
 

Welcome to CMS
:wq!                                                 ………






For Latest Updates: Subscribe Now | | Test Your Knowledge, Take a Quiz now Click Here | | Site Best Viewed In Firefox

X