View current configuration of all interfaces:
/usr/sbin/ifconfig -a
Configure network card and enable it in hardware level
ifconfig eth0 plumb
Assign ip and mask to interface
ifconfig eth0 192.168.100.12 broadcast 192.168.100.255 netmask 255.255.255.0
Uping the interface to work
ifconfig eth0 up
all commands together
ifconfig eth0 192.168.100.12 broadcast 192.168.100.255 netmask 255.255.255.0 plumb up
Check other hosts addressing for interfaces
arp -a
Assign default boot-time IP to interfaces by inserting ip address in proper hostname file
/etc/hostname.eth0 or /etc/hostname.qfe2
The postfix period (eth0) depends on device driver and number of that type.
Mapping names to IP is set in /etc/hosts
www.name1 192.168.10.10
www.name2 172.168.10.25
Setting defult gateway to act as router by inserting gateway address in /etc/defaultrouter
To set ip address of an interface by DHCP at boot-time proper hosname.*** file should be empty and another empty file, /etc/dhcp.*** , should be created.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment