Wednesday 30 October 2013

ELA_29_IPv4_Configuration

IPv4 Configuration:

Features:
1. DHCP
2. Static
3. Virtual (Sub) Interfaces - supports single physical connected to multiple logical
i.e. 192.168.0.0/24 && 192.168.1.0/24 && 10.0.0.0/30

Tasks:
1. Explore key: Directories & Files
a. '/etc/sysconfig/network' - system-wide settings: i.e. hostname, gateway, enabled|disabled
b. '/etc/sysconfig/networking' - 'system-config-network' tool controls this directory. Don't edit it manually.
c. '/etc/hosts' - local name DB - should contain a record for the localhost: i.e.
'localhost.localdomain'

Note: Add hosts to: '/etc/hosts', for which you cannot or should not resolve via DNS

d. '/etc/sysconfig/network-scripts'
d1. Interface configuration files - describes up/down config of interfaces: i.e. eth0
d2. Control files - describes hoe interfaces are to be brought: up/down - scripts
d3. Network function files - contais key network information required for the stack
d4. 'ifup-eth' - brings up ethernet interfaces: i.e. 'eth0', 'eth1', etc.
d5. 'ifdown-eth' - brings down ethernet interfaces: i.e. 'eth0', 'eth1', etc.

e. 'ifconfig' - enumerates configuration of interfaces
Note: At minimum, a routeable, connected system has at least 2 interfaces:
1. 'lo' - loopback - 127.0.0.1
2. 'eth0' - Ethernet0 - Your routable IP/Net
e2. 'ifconfig eth0:1 192.168.0.101 netmask 255.255.255.0'
e2.1 'ping -c 3 -I 192.168.0.100 192.168.0.101' - sources traffic as: 192.168.0.101
e3. 'ifconfig eth0:2 192.168.0.102 netmask 255.255.255.0'

e4. Preserve changes across system restart/ 'NetworkManager' service restart
e4.1. 'cp -v /etc/sysconfig/network-scripts/ifcfg-eth0:1'

f. 'ifcfg eth0:3 add 192.168.0.103/24' - Does duplicate address detection & sends ARP to hosts on the same Net as the interface
f1. 'ifcfg eth0:1 delete 192.168.0.101/24' - removes the sub-interface
f2. 'ifconfig eth0:3 del 192.168.0.103' - removes the sub-interface

No comments :

Post a Comment