[Xorp-users] Virtual interfaces in GNU/Linux
Pepo
pmancheno at gmail.com
Sun Dec 17 21:11:30 PST 2006
El Domingo, 17 de Diciembre de 2006 23:27, escribió:
> > El Domingo, 17 de Diciembre de 2006 11:50, escribió:
> > > > For my real-test I will use normal computers and some others as
> > > > routers with Xorp, but I have just one NIC in each PC, so, How do I
> > > > can use virtual interfaces just like in a normal GNU/Linux.
> > > >
> > > > ifconfig ethN:X <address>
> > > > (ifconfig eth0:1 192.168.1.1)
> > >
> > > First, you need to configure manually the virtual interfaces; i.e.,
> > > in advance before starting XORP (in the future XORP should have
> > > support for configuring virtual interfaces).
> > >
> > > Then, inside the XORP configuration you use the virtual interfaces
> > > as any other (physical) interface. For example, if the interface
> > > names shown by "ifconfig -a" are eth0:1 and eth0:2, then your
> > > configuration might look like the one below.
> > > Though, double-check that eth0:1 and eth0:2 are indeed configured
> > > with IP addresses, they are multicast capable (the MULTICAST flag is
> > > set), and are UP.
> > >
> > > Please let us know if this setup is not working properly.
> > >
> > > Regards,
> > > Pavlin
> > >
> > > ================================================================
> > >
> > > interfaces {
> > > interface eth0:1 {
> > > default-system-config
> > > }
> > > interface eth0:2 {
> > > default-system-config
> > > }
> > > }
> > >
> > > .../...
> > >
> > > ================================================================
> >
> > Lamentably it didn't work; I config /etc/network/interfaces (is the same
> > using commands -> ifconfig eth1 192.168.1.10 ... ifconfig eth1:1
> > 192.168.13.1):
> > =================/etc/network/interfaces============================ auto
> > lo
> > iface lo inet loopback
> >
> > auto eth1
> > iface eth1 inet static
> > address 192.168.1.10
> > netmask 255.255.255.0
> > network 192.168.1.0
> > broadcast 192.168.1.255
> >
> > auto eth1:1
> > iface eth1:1 inet static
> > address 192.168.13.1
> > netmask 255.255.255.0
> > network 192.168.13.0
> > broadcast 192.168.13.255
> > ================================================================
> >
> > Later my xorp config file:
> > ============================router.cis===========================
> > interfaces {
> > interface eth1{
> > default-system-config
> > }
> > interface eth1:1 {
> > default-system-config
> > }
> > }
> > .../...
> > ================================================================
> >
> > And get this error message:
> >
> > [ 2006/12/17 22:34:38 ERROR xorp_rtrmgr:3523 RTRMGR +330 main_rtrmgr.cc
> > run ] rtrmgr shutting down due to an init error: PARSE ERROR [Config File
> > router.cis, line 5]: syntax error; Last symbol parsed was "eth1"
>
> What is the output of the Linux command "ip addr" before starting
> XORP?
>
> It appears to me that the setup inside /etc/network/interfaces is
> used to assign multiple IP addresses per interface, which is
> different from configuring virtual interfaces.
>
> Pavlin
The output using ip addr is:
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 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 52:54:00:12:34:86 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.10/24 brd 192.168.1.255 scope global eth1
inet 192.168.13.1/24 brd 192.168.13.255 scope global eth1:1
inet6 fe80::5054:ff:fe12:3486/64 scope link
valid_lft forever preferred_lft forever
3: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
What do you think?
More information about the Xorp-users
mailing list