View previous topic :: View next topic |
Author |
Message |
iandow Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/942885416440dbf5f76999.png)
Joined: 21 Jul 2004 Posts: 135 Location: Washington, DC
|
Posted: Tue Nov 22, 2005 2:51 pm Post subject: How do I create a virtual network interface? |
|
|
Can anyone tell me how I can create a virtual network interface? I also need to know how to destroy it.
Thanks for any help.
-ian |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
badchien Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Simpsons/simpsons_santas_little_help.gif)
Joined: 16 Feb 2004 Posts: 415 Location: doghouse
|
Posted: Tue Nov 22, 2005 2:58 pm Post subject: |
|
|
Code: | # ifconfig eth0:0 192.168.101.101
# ifconfig eth0:0 up
# ifconfig eth0:0 down |
Alteratively, you can use this section in /etc/conf.d/net:
# For adding aliases to a interface
#
#alias_eth0="192.168.0.3 192.168.0.4" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
iandow Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/942885416440dbf5f76999.png)
Joined: 21 Jul 2004 Posts: 135 Location: Washington, DC
|
Posted: Tue Nov 22, 2005 3:58 pm Post subject: |
|
|
What's the ":0" mean in eth0:0? Is that a seperate device from eth0?
Thanks for the reply.
-ian |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
j-m Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
Joined: 31 Oct 2004 Posts: 975
|
Posted: Tue Nov 22, 2005 4:07 pm Post subject: |
|
|
iandow wrote: | What's the ":0" mean in eth0:0? Is that a seperate device from eth0?
Thanks for the reply.
-ian |
No, it isn't. Using iproute2 instead of net-tools avoids such confusion...
Code: |
# ip address show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:8d:ed:09:86 brd ff:ff:ff:ff:ff:ff
inet xxx.yyy.41.113/29 brd xxx.yyy.41.119 scope global eth0
inet xxx.yyy.41.114/29 brd xxx.yyy.41.119 scope global secondary eth0
inet xxx.yyy.41.115/29 brd xxx.yyy.41.119 scope global secondary eth0
inet xxx.yyy.41.116/29 brd xxx.yyy.41.119 scope global secondary eth0
inet xxx.yyy.41.117/29 brd xxx.yyy.41.119 scope global secondary eth0
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
badchien Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Simpsons/simpsons_santas_little_help.gif)
Joined: 16 Feb 2004 Posts: 415 Location: doghouse
|
Posted: Tue Nov 22, 2005 9:47 pm Post subject: |
|
|
It's just an alias for that device. You can make eth0:0, eth0:1, eth0:2... and so on. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|