networking , o-s

Linux Config – Adaptec duralan quad-nic

April 12, 2011

How to configuure, multiple IP addresses for a single network card:

/sbin/modprobe ip_alias

/sbin/route add default gw 192.168.0.222

iface eth0:0 inet static

address 192.168.0.42

netmask 255.255.255.0

network 192.168.0.0

broadcast 192.168.0.255

/etc/sysconfig/network-scripts/ifcfg-eth0

            device=eth0:0

            bootproto=static

            ipaddr=192.168.0.42

            netmask=255.255.255.0

            onboot=yes

IP Aliasing:

/sbin/ifconfig eth0 192.168.0.1

/sbin/ifconfig eth0:0 192.168.0.42

/sbin/ifconfig eth0:1 192.168.0.100

/sbin/ifconfig eth0:2 192.168.0.201

Adding routes:

/sbin/route add –net 192.168.0.0. dev eth0

/sbin/route add –host 192.168.0.1 dev eth0

/sbin/route add –host 192.168.0.42 dev eth0:0

/sbin/route add –host 192.168.0.100 dev eth0:1

/sbin/route add –host 192.168.0.201 dev eth0:2

/etc/protocols

7 – ftp, http, telnet, smtp, smb

6 – radius, nts, dns, ntp

5 – netbios, rpc-ssl

4 – tcp, udp

3 – icmp, igmp (router protocols), arp, rarp

2 – token  r-d  ppp, skip,  serial-d wan-d

1 – telnet, tr, rs232, v.90 t1-3 (10 base 2/t)

www.bestitdocuments.com