1833059 Members
2483 Online
110049 Solutions
New Discussion

1 interface 2 ip?

 
SOLVED
Go to solution
twtandigi.com.my
Frequent Advisor

1 interface 2 ip?

How can i bind 2 ipaddress to 1 interface?
Have anyone done this before?
what are the steps needed to do for it to work
3 REPLIES 3
Joseph Loo
Honored Contributor
Solution

Re: 1 interface 2 ip?

multiplexing. that's the way.

# vi /etc/rc.config.d/netconf:

INTERFACE_NAME[3]=lan0:0
IP_ADDRESS[3]=128.4.1.1
SUBNET_MASK[3]=255.255.0.0

INTERFACE_NAME[3]=lan0:1
IP_ADDRESS[3]=128.4.1.2
SUBNET_MASK[3]=255.255.0.0

# /sbin/init.d/net stop
# /sbin/init.d/net start

take note that the above is an example. do let me know the result.

regards.

what you do not see does not mean you should not believe
Naveej.K.A
Honored Contributor

Re: 1 interface 2 ip?

hi

for 11i use the ifconfig commands

ifconfig lan0:1 192.168.100.1 netmask 255.255.255.0 up

will make the interface running....
to make the changes permanent, put the following entries in /etc/rc.config.d/netconf

IP_ADDRESS[1]=192.168.100.1
SUBNET_MASK[1]=255.255.255.0
INTERFACE_NAME[1]=lan0:1
BROADCAST_ADDRESS[1]=192.168.100.255
INTERFACE_STATE[1]=up


U can do it through sam also...
sam --> networking and communications -->Network interface cards -->select lan0 --> actions --> add ip logical interface.

In 10.x you need to install a patch for the same. as far as i remember it is PHCO12492 and it adds a command ifalias...

with best wishes
Naveej
practice makes a man perfect!!!
Bharat Katkar
Honored Contributor

Re: 1 interface 2 ip?

You can do it with ifconfig also:

# ifconfig lan0:1 UP

Check whether it is working fine and ofcourse to make the changes permanent follow Loo's method.

Hope that helps.
Regards,
You need to know a lot to actually know how little you know