Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


How to give 2 different gateway IP addresses for 2
different interfaces in same system ?

Answers were Sorted based on User's Feedback



How to give 2 different gateway IP addresses for 2 different interfaces in same system ?..

Answer / none

route add -net 192.168.2.0 netmask 255.255.255.0 gw
192.168.0.2 dev eth0


route add -net 192.168.1.0 netmask 255.255.255.0 gw
192.168.0.3 dev eth1

Is This Answer Correct ?    17 Yes 2 No

How to give 2 different gateway IP addresses for 2 different interfaces in same system ?..

Answer / fuzail usmani

Run ifconfig command.u got 2 interface with eth0 & eth1 name.


#ifconfig eth0 172.16.68.2 netmask 255.255.0.0 gw 172.16.68.1 up

#ifconfig eth1 192.168.0.2 netmask 255.255.255.0 gw
192.168.0.1 up

Is This Answer Correct ?    14 Yes 0 No

How to give 2 different gateway IP addresses for 2 different interfaces in same system ?..

Answer / ayyappan .m

route add -net 192.168.2.0 netmask 255.255.255.0 gw
192.168.0.2 dev eth0


route add -net 192.168.1.0 netmask 255.255.255.0 gw
192.168.0.3 dev eth1

This will work temporary, if you want to make as a permanent.
Create the file route-eth0 in
/etc/sysconfig/network-scripts/ make the entry
Or
Make the entry on /etc/rc.local

#cat /etc/sysconfig/network-scripts/ifcfg-eth0
#cat /etc/sysconfig/network-scripts/ifcfg-eth1

This two files ONBOOT=yes

#service network restart

Is This Answer Correct ?    13 Yes 1 No

How to give 2 different gateway IP addresses for 2 different interfaces in same system ?..

Answer / raj

In terminal----> "neat"----->Network
configuration------>display two ethernets cards (Eth0, Eth1)
select the cards and assign the ip-address,
netmask,gateway.----->save and exit restart the service

Is This Answer Correct ?    3 Yes 0 No

How to give 2 different gateway IP addresses for 2 different interfaces in same system ?..

Answer / mcmarc

open each device file in
/etc/sysconfig/network-scripts/ifcfg-eth0(1)

Is This Answer Correct ?    3 Yes 0 No

Post New Answer



More Linux AllOther Interview Questions

Who owns the data dictionary?

2 Answers  


what is memory mapped / IO mapped ? Which calls used for this to access any hardware address in linux device driver ?

3 Answers   Broadcom,


am installed windows and later i installed ubuntu i want to unistall ubuntu can any one tel the procedure to uninstall ubuntu in my windows 7 please mail to me ---kiranpulsar2007@gmail.com and later i want to install ubuntu after uninstalling ubuntu tel the procedure for that also i dont know to patrition the hard disk drive please tel to them please reply

1 Answers  


You want to create a compressed backup of the users' home directories. What utility should you use?

5 Answers  


What are the main differences between RHEL4 & RHEL5?

11 Answers  






what are the steps for Password-less ssh

5 Answers   IBM, Mind Tree,


What is the difference between Telnet and SSH?

17 Answers   Bayer, KTree,


How do display error messages instantly when command fails?

4 Answers  


what is the use of runlevel 4 in redhat linux? in which cases it will use.

1 Answers  


What is the other method of installing Linux O.S other than Text, GUI mode? Why we prefer that for installation of Linux in Real time?

2 Answers  


1 which file contains information about os wether it's 32 bit or 64 bit os 2 difference between logical block and physical block?? 3 what is the size of logical block and physical block?? 4 daemon for nfs on client end as well as server end??? 5 how to confirm from client end about nfs server sharing?? 6 what contains information about file and directory creating time or modification time??

4 Answers   Oracle,


In how many ways linux can be installed n explain th steps involved in installation in any of the method..?

1 Answers   IBM,






Categories