пятница, 27 февраля 2009 г.

Solaris Network

1. Enable the network card

#ifconfig hme0 plumb

ifconfig -a

hme0: flags=842 mtu 1500
inet 0.0.0.0 netmask 0
ether 3:22:11:6d:2e:1f

2. Configuring ipaddress and netmask and making the interface status as up .

#ifconfig hme0 192.9.2.106 netmask 255.255.255.0 up

#ifconfig -a

hme0: flags=843 mtu 1500
inet 192.9.2.106 netmask ffffff00 broadcast 192.9.2.255
ether 3:22:11:6d:2e:1f

The file /etc/netmasks is used to define netmasks for ip addresses .

127.0.0.1, is the standard loop back route and 127.0.0.0 is the default loopback ipaddress used by the kernel when no interface is configured this will be the only entry dispalyed by the system on invoking ifconfig -a command..

3. Configuring Virtual interface :

#ifconfig hme0:1 172.40.30.4 netmask 255.255.0.0 up

ifconfig -a

hme0: flags=843 mtu 1500
inet 192.9.2.106 netmask ffffff00 broadcast 192.9.2.255
ether 3:22:11:6d:2e:1f
hme0:1: flags=842 mtu 1500
inet 172.40.30.4 netmask ffff0000 broadcast 172.40.255.255

4. Ip-forwording :

/etc/rc2.d/S69inet .

#ndd -set /dev/ip ip_forwarding 0

5. Router Configuration

#route add -net 10.0.0.0 -netmask 255.0.0.0 172.40.30.1 1

/etc/defaultrouter.

#route add default 205.100.155.2 1

#route change default 205.100.155.2 1

#########################################################################

Add Network


Persistence IPv4 Configuration:

first NIC 192.168.1.x
new NIC 192.168.2.x

prtconf -vD

ifconfig -a

lo0: flags=1000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843 mtu 1500 index 2
inet 192.168.1.100 netmask ffffff00 broadcast 192.168.1.255
ether

add a line to the /etc/hosts file for our new card:

192.168.2.100 host2.mydomain.com host2


/etc/hostname.hme1

host2.mydomain.com

/etc/netmasks:

192.168.2.0 255.255.255.0

ifconfig -a

lo0: flags=1000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843 mtu 1500 index 2
inet 192.168.1.100 netmask ffffff00 broadcast 192.168.1.255
ether
hme1: flags=1000843 mtu 1500 index 3
inet 192.168.2.100 netmask ffffff00 broadcast 192.168.2.255
ether


Non-Persistence IPv4 Configuration:

ifconfig hme1 plumb
ifconfig hme1 192.168.2.100 netmask 255.255.255.0
ifconfig hme1 up

Комментариев нет:

Отправить комментарий