Modify

Opened 3 years ago

Closed 3 years ago

#19624 closed defect (fixed)

Static route is not created for xl2tpd vpn client interface

Reported by: duvi Owned by: developers
Priority: normal Milestone:
Component: packages Version: Trunk
Keywords: l2tp xl2tpd static route Cc:

Description

Using current trunk.
I define an uci interface name 'vpn' in network config for the l2tp connection named 'vma', and a route called 'myroute'.
The interface comes up, but the route is not created.

Config:

root@OpenWrt:~# cat /etc/config/network
config 'interface' 'loopback'
        option 'ifname'   'lo'
        option 'proto'    'static'
        option 'ipaddr'   '127.0.0.1'
        option 'netmask'  '255.0.0.0'

config 'interface' 'lan'
        option 'ifname'   'eth0'
        option 'type'     'bridge'
        option 'proto'    'static'
        option 'ipaddr'   '192.168.1.1'
        option 'netmask'  '255.255.255.0'
        option 'ip6assign' '60'

config 'interface' 'wan'
        option 'ifname'   'eth1'
        option 'proto'    'pppoe'
        option 'authfail' '1'
        option 'username' 'user'
        option 'password' 'pass'

config 'interface' 'vpn'
        option 'ifname'   'vma'
        option 'proto'    'none'

config 'route' 'myroute'
        option 'interface' 'vpn'
        option 'target'    '192.168.200.0'
        option 'netmask'   '255.255.255.0'
        option 'gateway'   '192.168.200.1'

Interfaces:

root@OpenWrt:~# ifconfig
br-lan    Link encap:Ethernet  HWaddr A0:F3:C1:5F:D7:81
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1061 errors:0 dropped:111 overruns:0 frame:0
          TX packets:1168 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:192043 (187.5 KiB)  TX bytes:699965 (683.5 KiB)

eth0      Link encap:Ethernet  HWaddr A0:F3:C1:5F:D7:81
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:5

eth1      Link encap:Ethernet  HWaddr A0:F3:C1:5F:D7:83
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1242 errors:0 dropped:2 overruns:0 frame:0
          TX packets:1044 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:596346 (582.3 KiB)  TX bytes:170303 (166.3 KiB)
          Interrupt:4

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:38 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3517 (3.4 KiB)  TX bytes:3517 (3.4 KiB)

pppoe-wan Link encap:Point-to-Point Protocol
          inet addr:x.x.x.x  P-t-P:y.y.y.y  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:799 errors:0 dropped:0 overruns:0 frame:0
          TX packets:715 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:513245 (501.2 KiB)  TX bytes:144645 (141.2 KiB)

vma       Link encap:Point-to-Point Protocol
          inet addr:192.168.200.100  P-t-P:192.168.200.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1410  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr A0:F3:C1:5F:D7:82
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1071 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1385 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:207383 (202.5 KiB)  TX bytes:759661 (741.8 KiB)

Routing table (missing 'myroute' defined in network config):

root@OpenWrt:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         lo1.rsr1-pecs.n 0.0.0.0         UG    0      0        0 pppoe-wan
y.y.y.y         *               255.255.255.255 UH    0      0        0 pppoe-wan
192.168.1.0     *               255.255.255.0   U     0      0        0 br-lan
192.168.200.1   *               255.255.255.255 UH    0      0        0 vma

Attachments (0)

Change History (3)

comment:1 Changed 3 years ago by yousong

Cc me.

comment:2 Changed 3 years ago by duvi

Seems to be working after recent xl2tpd commits if l2tp is configured via luci.

comment:3 Changed 3 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.