Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

What is the difference between home directory and working directory?

10 Answers   Accenture, Flexi,


What is the difference between RedHat linux and Fedora and Ubuntu?

3 Answers   CSC,


What are the questions we are expecting for 2yrs. experience guy for linux company interview questions?

1 Answers  


What is the minimum number of partitions you need to install Linux?

30 Answers  


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

5 Answers  


When you install RedHat what is the kernel mode ? What is kernel compilation / upgrade ?

4 Answers   IBM,


There are 4 network Interfaces, how can we find which one is Primary.

2 Answers  


what are the steps for Password-less ssh

5 Answers   IBM, Mind Tree,


Which directory is closer to the top of the file system tree, parent directory or current directory?

3 Answers  


what is meant by mysql clustering

2 Answers  


Through ssh whole directory structure from / is shared regardless the user we have connected with ....... how do i prevent sharing ??

4 Answers   Tech Mahindra,


In Linux(RHEL) server have two users with same name. one is local user and second one is NIS user. if you login the server which user will login (local or NIS)

1 Answers  


Categories