[Xorp-users] Virtual interfaces in GNU/Linux

Pepo pmancheno at gmail.com
Sun Dec 17 20:18:04 PST 2006


El Domingo, 17 de Diciembre de 2006 11:50, escribió:
> > I am trying with Xorp for my multicast thesis and looks terrific :) my
> > tests were using (just one) Debian Etch box and Qemu so I had a virtual
> > network just like the image attached; but now I have to show my tests in
> > a real network.
> >
> > 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
>     }
> }
>
> plumbing {
>     mfea4 {
>         interface eth0:1 {
>             vif eth0:1 {
>                 disable: false
>             }
>         }
>         interface eth0:2 {
>             vif eth0:2 {
>                 disable: false
>             }
>         }
>         interface register_vif {
>             vif register_vif {
>                 disable: false
>             }
>         }
>     }
> }
>
> protocols {
>     igmp {
>         interface eth0:1 {
>             vif eth0:1 {
>                 disable: false
>             }
>         }
>         interface eth0:2 {
>             vif eth0:2 {
>                 disable: false
>             }
>         }
>     }
>
>     pimsm4 {
>         interface eth0:1 {
>             vif eth0:1 {
>                 disable: false
>             }
>         }
>         interface eth0:2 {
>             vif eth0:2 {
>                 disable: false
>             }
>         }
>         interface register_vif {
>             vif register_vif {
>                 disable: false
>             }
>         }
>
> 	static-rps {
> 	    rp 10.0.0.1 {
> 		group-prefix 224.0.0.0/4 {
> 		}
> 	    }
> 	}
>     }
>
>     fib2mrib {
>         disable: false
>     }
> }
>
> ================================================================

What if I use:

interfaces {
	interface eth1 {
		disable: false
		vif eth1 {
			disable: false
			address 192.168.1.10 {
				prefix-length: 24
				broadcast: 192.168.1.255
				disable: false
			}
			address 192.168.13.1 {
				prefix-length: 24
				broadcast: 192.168.13.255
				disable: false
			}
		}
	}
}

plumbing {
	mfea4 {
		disable: false
		interface eth1 {
			vif eth1 {
				disable: false
			}
		}
		interface register_vif {
			vif register_vif {
				disable: false
			}
		}
	}
}

protocols {
	igmp {
		disable: false
		interface eth1 {
			vif eth1 {
				disable: false
			}
		}
	}
	pimsm4 {
		disable: false
		interface eth1 {
			vif eth1 {
				disable: true
			}
		}
		interface register_vif {
			vif register_vif {
				disable: false
			}
		}
		bootstrap {
			disable: false
			cand-bsr {
				scope-zone 224.0.0.0/4 {
					cand-bsr-by-vif-name: "eth1"
				}
			}
		}
	}
}

I mean just using differents IPs in the same NIC --> Do it works? efficient?

In my virtual test I have a PC with 4 NICs, I dont if using 4 IPs is the same 
(efficient) of 4 NICs.

-- 
           Linux User Registered #232544
             Jabber : pepo at jabberes.org
              Ekiga : pepo at ekiga.net
                ICQ : 337889406
          GnuPG-key : www.keyserver.net
---------------- -------------------------------
                   dum loquimur, fugerit invida
aetas: carpe diem, quam minimum credula postero.




More information about the Xorp-users mailing list