IP Maps

Taking care of your Linux box.
mfaisalkh
Havaldaar
Posts: 124
Joined: Wed Mar 17, 2004 4:05 pm
Location: Karachi

IP Maps

Postby mfaisalkh » Sun Jul 04, 2004 9:45 am

Dear Users,

My server IP is 192.168.0.1, so i want another IPs(192.168.0.2,192.168.0.3,192.168.0.4) on the same NIC with the follwoing command:

/sbin/route 192.168.0.2 eth0:1
/sbin/route 192.168.0.3 eth0:2
/sbin/route 192.168.0.4 eth0:3

Also i used the follwing command too:

/sbin/route add 192.168.0.2 eth0
/sbin/route add 192.168.0.3 eth0
/sbin/route add 192.168.0.4 eth0

and checked that by using /sbin/route -n command

But after sometime i was started the system all these routes were not display.

Any1 tell me how it is possible that these routes always exist on my system.

LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Postby LinuxFreaK » Sun Jul 04, 2004 12:25 pm

Dear mfaisalkh,
Salam,

/sbin/route add 192.168.0.2 eth0:1
/sbin/route add 192.168.0.3 eth0:2
/sbin/route add 192.168.0.4 eth0:3

Best Regards.
Farrukh Ahmed

farhantoqeer
Major General
Posts: 917
Joined: Thu Jun 27, 2002 5:45 pm
Location: Karachi
Contact:

Postby farhantoqeer » Sun Jul 04, 2004 1:41 pm

ifconfig can also do that.
A: Yes
Q: Is top-posting bad?

kashif
Naib Subedar
Posts: 305
Joined: Wed Oct 15, 2003 2:44 am
Location: Okara

Postby kashif » Mon Jul 05, 2004 5:25 pm

# ifconfig eth0:1 192.168.0.2 netmask 255.255.255.0

# ifconfig eth0:2 192.168.0.3 netmask 255.255.255.0

# ifconfig eth0:3 192.168.0.3 netmask 255.255.255.0

And if you want setting will intact after rebooting the system add them in

/etc/rc.local file
**********************************************

As-Salaatu was-Salaamu Alaika Ya Sayyidi Ya Rasool ALLAH

**********************************************


Return to “Administration”

Who is online

Users browsing this forum: No registered users and 1 guest