Re: [mpls-linux-general] [mpls example]another question
Status: Beta
Brought to you by:
jleu
|
From: James R. L. <jl...@mi...> - 2005-12-21 14:44:16
|
First, you need to work on your ascii-art-foo a bit :-)
-don't use tabs
-use a 80 column, fixed font, text editor (vi, emacs)
I've cleaned up your drawing:
=20
192.168.101.0/24 192.168.103.0/24
| |
| |
------eth0 eth0------eth1 v eth1----eth0 eth0---eth1 v eth1------
| HostA |--------| LER1 |---------| LSR |-----| LER2 |----------| HostB=
|
------.10 ^ 20-------20 30-----30 ^ 40-----40 50------
| |
| |=20
192.168.100.0/24 192.168.102.0/24
Comments in-line...
> Configuration
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
> HostA
> ------
> ip route add 192.168.103.50/32 via 192.168.100.20
>=20
> LER1
> ------
> mpls nhlfe add key 0 instructions push gen 1000 nexthop eth0 ipv4 192.16=
8.100.20
> ip route add 192.168.103.50/32 via 192.168.101.30 spec_nh 0x8847 0x2
> mpls labelspace add dev eth1 labelspace 0
> mpls ilm add label gen 1002 labelspace 0
> mpls xc add ilm_label gen 1002 ilm_labelspace 0 nhlfe_key 0x2
No XC required. At the simplest level XCs are used for
labelswaping, therefor they are not used on LERS.
> LSR
> -----
> mpls nhlfe add key 0 instructions push gen 1000 nexthop eth0 ipv4 192.16=
8.102.40
> mpls nhlfe add key 0 instructions push gen 1002 nexthop eth1 ipv4 192.16=
8.101.20
> ip route add 192.168.103.50/32 via 192.168.102.40 spec_nh 0x8847 0x2
> ip route add 192.168.100.10/32 via 192.168.101.20 spec_nh 0x8847 0x3
> mpls labelspace add dev eth0 labelspace 0
> mpls labelspace add dev eth1 labelspace 0
> mpls ilm add label gen 1000 labelspace 0
> mpls ilm add label gen 1002 labelspace 0=20
> mpls xc add ilm_label gen 1000 ilm_labelspace 0 nhlfe_key 0x2
> mpls xc add ilm_label gen 1002 ilm_labelspace 0 nhlfe_key 0x3
No need for the 'ip route' statements. You're labelswaping here, the
packets will never leaves the MPLS stack, therefore they will never see
the IPv4 routing table.
> LER2
> -----
> mpls nhlfe add key 0 instructions push gen 1002 nexthop eth1 ipv4 192.16=
8.103.40
> ip route add 192.168.100.10/32 via 192.168.103.40 spec_nh 0x8847 0x2
> mpls labelspace add dev eth0 labelspace 0
> mpls ilm add label gen 1000 labelspace 0
> mpls xc add ilm_label gen 1000 ilm_labelspace 0 nhlfe_key 0x2
Again no XCs on LERs.
> HostB
> ------
> ip route add 192.168.100.10/32 via 192.168.103.40
--=20
James R. Leu
jl...@mi...
|