Salam to all,
How can we define Multiple IPs and Gateway IPs to a Single Ethernet card.Suppose I have two different subnet IPs Address with Gateway.So please Kindly let me the command to define the multiple IPs and Gateway.
Suppose I have Two Different IPs:-
IP:192.168.1.1 Subnet Mask:255.255.255.0 Gateway 192.168.1.10
IP:202.251.150.5 Subnet Mask 255.255.255.0 Gateway 202.251.150.1
Plz help me
Thanks & Regards
Athar Hussain
Multiple IPs and Gateway
-
- Site Admin
- Posts: 5132
- Joined: Fri May 02, 2003 10:24 am
- Location: Karachi
- Contact:
Re:
Dear ather_36,
Salam,
Route command will help you. You must read the manual of route command.
# man route
# route add -net 192.168.1.1 netmask 255.255.255.0 gw 192.168.1.10
# route add -net 202.251.150.5 netmask 255.255.255.0 gw 202.251.150.1
P.S: I do not ask you this publicly but i have no other choice, i am still waiting for you to return my Book. When i will get my Book back ?
Best Regards.
Salam,
Route command will help you. You must read the manual of route command.
# man route
# route add -net 192.168.1.1 netmask 255.255.255.0 gw 192.168.1.10
# route add -net 202.251.150.5 netmask 255.255.255.0 gw 202.251.150.1
P.S: I do not ask you this publicly but i have no other choice, i am still waiting for you to return my Book. When i will get my Book back ?
Best Regards.
Farrukh Ahmed
-
- Lance Naik
- Posts: 41
- Joined: Sat Jan 13, 2007 1:36 pm
- Location: Bangladesh
- Contact:
-
- Site Admin
- Posts: 5132
- Joined: Fri May 02, 2003 10:24 am
- Location: Karachi
- Contact:
Re:
Dear sakimustafa,
Salam,
Best Regards.
Salam,
What is the problem now ?sakimustafa wrote:I did it in this way :
route add -net 10.0.40.0 netmask 255.255.255.0 dev eth1
route add -net 192.168.100.0 netmask 255.255.255.0 dev eth1
Best Regards.
Farrukh Ahmed
-
- Battalion Havaldaar Major
- Posts: 267
- Joined: Tue Nov 18, 2003 10:28 am
- Location: Rampuria Mansion
- Contact:
Salam,
QOUTES
"""How can we define Multiple IPs and Gateway IPs to a Single Ethernet card.Suppose I have two different subnet IPs Address with Gateway.So please Kindly let me the command to define the multiple IPs and Gateway.
Suppose I have Two Different IPs:-
IP:192.168.1.1 Subnet Mask:255.255.255.0 Gateway 192.168.1.10
IP:202.251.150.5 Subnet Mask 255.255.255.0 Gateway 202.251.150.1"""
How can one single ethernet be on two different subnets.Do you have the multiport ethernet.Or If you can anyways define it you canot use multiple routers at the sametime.
Regards
Abdul Mateen.
QOUTES
"""How can we define Multiple IPs and Gateway IPs to a Single Ethernet card.Suppose I have two different subnet IPs Address with Gateway.So please Kindly let me the command to define the multiple IPs and Gateway.
Suppose I have Two Different IPs:-
IP:192.168.1.1 Subnet Mask:255.255.255.0 Gateway 192.168.1.10
IP:202.251.150.5 Subnet Mask 255.255.255.0 Gateway 202.251.150.1"""
How can one single ethernet be on two different subnets.Do you have the multiport ethernet.Or If you can anyways define it you canot use multiple routers at the sametime.
Regards
Abdul Mateen.
Abdul Mateen,
Google Android Developer & Linux Administrator
Addictive Mobility,CA
www.addictivemobility.com.
Google Android Developer & Linux Administrator
Addictive Mobility,CA
www.addictivemobility.com.
-
- Site Admin
- Posts: 5132
- Joined: Fri May 02, 2003 10:24 am
- Location: Karachi
- Contact:
Re:
Dear abdul_mateen,
Salam,
I believe you should read the manuals. I have not done this before so i can not tell you exactly.
# man ifconfig
# man route
# man ip
Best Regards.
Salam,
I believe you should read the manuals. I have not done this before so i can not tell you exactly.
# man ifconfig
# man route
# man ip
Best Regards.
Farrukh Ahmed
-
- Battalion Havaldaar Major
- Posts: 286
- Joined: Fri Oct 17, 2003 12:15 am
- Location: Karachi
- Contact:
You can achieve this task by giving some commands through ifconfig.I think you are asking for ipaliasing.Suppose you have a ethernet card eth0 and you want two ip's for this.you can do it with the following command:
ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
and you can give the other ip for this ethernet card like this
ifconfig eth0:0 192.168.0.2 netmask 255.255.255.0 up
Check this link also :
Multiple IP addresses on a single NIC
ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
and you can give the other ip for this ethernet card like this
ifconfig eth0:0 192.168.0.2 netmask 255.255.255.0 up
Check this link also :
Multiple IP addresses on a single NIC
Good Judgement comes from Experience and Experience comes from bad Judgement!!
The more I know, the more I realize I don't know!?
The easiest way to find out is to try Out!!!
Registered Linux user #333501
The more I know, the more I realize I don't know!?
The easiest way to find out is to try Out!!!
Registered Linux user #333501