Link to home
Start Free TrialLog in
Avatar of Member_2_7969923
Member_2_7969923

asked on

linux ip routing problem juju lxd

i want to juju bootstrap localhost but the client cannot connect to the lxd daemon during installation..it seems to be a routing problem. both subnets are on the same vlan.

vlan 400

192.168.10.0/24
10.14.162.0/24

root@maas:~# ifconfig
ens160    Link encap:Ethernet  HWaddr 00:50:56:99:5f:63  
          inet addr:192.168.10.1  Bcast:192.168.10.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe99:5f63/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:390619 errors:0 dropped:5 overruns:0 frame:0
          TX packets:68215 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:534722073 (534.7 MB)  TX bytes:19579105 (19.5 MB)

ens192    Link encap:Ethernet  HWaddr 00:50:56:99:14:a0  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:469882 errors:0 dropped:0 overruns:0 frame:0
          TX packets:351 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:555261395 (555.2 MB)  TX bytes:34514 (34.5 KB)

ens224    Link encap:Ethernet  HWaddr 00:50:56:99:12:b9  
          inet addr:192.168.178.114  Bcast:192.168.178.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe99:12b9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8611 errors:0 dropped:0 overruns:0 frame:0
          TX packets:217 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1156377 (1.1 MB)  TX bytes:22788 (22.7 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2738158 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2738158 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:2810334230 (2.8 GB)  TX bytes:2810334230 (2.8 GB)

lxdbr0    Link encap:Ethernet  HWaddr 00:50:56:99:14:a0  
          inet addr:10.14.162.1  Bcast:10.14.162.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe99:14a0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5376 errors:0 dropped:16 overruns:0 frame:0
          TX packets:351 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:628862 (628.8 KB)  TX bytes:34514 (34.5 KB)

openstack0 Link encap:Ethernet  HWaddr 6a:ec:1d:14:12:27  
          inet addr:10.99.0.1  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::68ec:1dff:fe14:1227/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:13595 (13.5 KB)

root@maas:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.10.253  0.0.0.0         UG    0      0        0 ens160
10.14.162.0     0.0.0.0         255.255.255.0   U     0      0        0 lxdbr0
10.99.0.0       0.0.0.0         255.255.255.0   U     0      0        0 openstack0
91.189.88.141   192.168.178.1   255.255.255.255 UGH   0      0        0 ens224
192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 ens160
192.168.178.0   0.0.0.0         255.255.255.0   U     0      0        0 ens224


#############

so when im trying to ping from ens160 to the lxd bridge i get this

root@maas:~# ping -I  ens160 10.14.162.1
PING 10.14.162.1 (10.14.162.1) from 192.168.10.1 ens160: 56(84) bytes of data.
From 192.168.10.253: icmp_seq=1 Redirect Host(New nexthop: 10.14.162.1)
From 192.168.10.253: icmp_seq=2 Redirect Host(New nexthop: 10.14.162.1)
^C
--- 10.14.162.1 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1001ms


192.168.10.253 is another server which act as a router but probably misconfigured.

here is the router

#############


root@bwell:/home/baum# ifconfig
eno1      Link encap:Ethernet  HWaddr 2c:56:dc:38:8a:9e  
          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:20 Memory:fbc00000-fbc20000

enp10s0   Link encap:Ethernet  HWaddr 68:05:ca:42:ff:b9  
          inet addr:192.168.4.1  Bcast:192.168.4.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:116605154 errors:0 dropped:33138 overruns:0 frame:0
          TX packets:203767612 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:103624194948 (103.6 GB)  TX bytes:279641652203 (279.6 GB)
          Interrupt:16 Memory:fb7c0000-fb7e0000

enp10s0.100 Link encap:Ethernet  HWaddr 68:05:ca:42:ff:b9  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::276a:311d:cad3:e2e3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:26215 errors:0 dropped:0 overruns:0 frame:0
          TX packets:37923 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4182522 (4.1 MB)  TX bytes:6220524 (6.2 MB)

enp10s0.200 Link encap:Ethernet  HWaddr 68:05:ca:42:ff:b9  
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::22e5:811a:a696:8555/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:66469938 errors:0 dropped:12 overruns:0 frame:0
          TX packets:188740324 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:98174125966 (98.1 GB)  TX bytes:257693807797 (257.6 GB)

enp10s0.300 Link encap:Ethernet  HWaddr 68:05:ca:42:ff:b9  
          inet addr:192.168.3.1  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::f742:d553:67e6:ee47/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:40109 errors:0 dropped:0 overruns:0 frame:0
          TX packets:44437 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8303250 (8.3 MB)  TX bytes:7176192 (7.1 MB)

enp10s0.400 Link encap:Ethernet  HWaddr 68:05:ca:42:ff:b9  
          inet addr:192.168.10.253  Bcast:192.168.10.255  Mask:255.255.255.0
          inet6 addr: fe80::a90c:1709:b261:5b07/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2402171 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11029542 errors:0 dropped:3105 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:258912390 (258.9 MB)  TX bytes:20025948263 (20.0 GB)

enp10s0.400:1 Link encap:Ethernet  HWaddr 68:05:ca:42:ff:b9  
          inet addr:10.14.162.48  Bcast:10.14.162.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

enp11s0   Link encap:Ethernet  HWaddr 2c:56:dc:39:4d:ee  
          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)
          Memory:fb600000-fb61ffff

ens6      Link encap:Ethernet  HWaddr 68:05:ca:42:ff:99  
          inet addr:192.168.178.47  Bcast:192.168.178.255  Mask:255.255.255.0
          inet6 addr: 2a02:810d:8ac0:26c4:45da:7dc1:6965:f8b6/64 Scope:Global
          inet6 addr: 4006:7c11:c0a8:b26c:4272:a112:eb4f:310d/64 Scope:Global
          inet6 addr: 4006:41dd:c0a8:b26c:904e:79ac:f598:21ea/64 Scope:Global
          inet6 addr: 4006:47b:c0a8:b26c:34a7:94e5:5262:3dc0/64 Scope:Global
          inet6 addr: 2a02:810d:8ac0:26c4:a152:37bb:3644:9986/64 Scope:Global
          inet6 addr: 4006:3d43:c0a8:b26c:a240:6932:b342:3fef/64 Scope:Global
          inet6 addr: 2a02:810d:8ac0:26c4:cd70:95fe:2760:a088/64 Scope:Global
          inet6 addr: fe80::302a:2822:b274:9819/64 Scope:Link
          inet6 addr: 4006:17cd:c0a8:b26c:aa6f:223e:35bd:2274/64 Scope:Global
          inet6 addr: 2a02:810d:8ac0:26c4:b0e0:578f:513f:b530/64 Scope:Global
          inet6 addr: 2a02:810d:8ac0:26c4:391e:a044:e8eb:40a3/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:27834556 errors:0 dropped:6023 overruns:0 frame:0
          TX packets:80011249 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:21652693210 (21.6 GB)  TX bytes:110587246473 (110.5 GB)
          Interrupt:27 Memory:fbbc0000-fbbe0000

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:213555 errors:0 dropped:0 overruns:0 frame:0
          TX packets:213555 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:64455221 (64.4 MB)  TX bytes:64455221 (64.4 MB)

wlp13s0   Link encap:Ethernet  HWaddr 74:c6:3b:00:84:60  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:29
          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:18

root@bwell:/home/baum# ip route add 10.14.162.0/24 via 0.0.0.0 dev enp10s0.400:1 src 10.14.162.48
root@bwell:/home/baum# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.178.1   0.0.0.0         UG    100    0        0 ens6
10.14.162.0     0.0.0.0         255.255.255.0   U     0      0        0 enp10s0.400
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 enp10s0
192.168.1.0     0.0.0.0         255.255.255.0   U     400    0        0 enp10s0.100
192.168.2.0     0.0.0.0         255.255.255.0   U     400    0        0 enp10s0.200
192.168.3.0     0.0.0.0         255.255.255.0   U     400    0        0 enp10s0.300
192.168.4.0     0.0.0.0         255.255.255.0   U     100    0        0 enp10s0
192.168.10.0    0.0.0.0         255.255.255.0   U     400    0        0 enp10s0.400
192.168.178.0   0.0.0.0         255.255.255.0   U     100    0        0 ens6
root@bwell:/home/baum#


###########################


and here is the cisco layer 3 switch/router

switchff3a2d#show ip route
Maximum Parallel Paths: 1 (1 after reset)
IP Forwarding: enabled
Codes: > - best, C - connected, S - static


S   0.0.0.0/0 [1/1] via 192.168.178.1, 95:01:51, vlan 1                    
C   10.14.162.0/24 is directly connected, vlan 400                        
C   192.168.1.0/24 is directly connected, vlan 100                        
C   192.168.2.0/24 is directly connected, vlan 200                        
C   192.168.3.0/24 is directly connected, vlan 300                        
C   192.168.10.0/24 is directly connected, vlan 400                        
C   192.168.178.0/24 is directly connected, vlan 1                    

switchff3a2d#show ip interface
                                                                                                                               
                                                                                                                               
    IP Address        I/F    I/F Status  Type   Directed  Prec Redirect Status                                                
                             admin/oper         Broadcast                                                                      
------------------ --------- ---------- ------- --------- ---- -------- ------                                                
10.14.162.49/24    vlan 400  UP/UP      Static  disable   No   enable   Valid                                                  
192.168.1.254/24   vlan 100  UP/UP      Static  disable   No   enable   Valid                                                  
192.168.2.254/24   vlan 200  UP/UP      Static  disable   No   enable   Valid                                                  
192.168.3.254/24   vlan 300  UP/UP      Static  disable   No   enable   Valid                                                  
192.168.10.254/24  vlan 400  UP/UP      Static  disable   No   enable   Valid                                                  
192.168.178.45/24  vlan 1    UP/UP      Static  disable   No   enable   Valid                                                  


################


can somebody help me?
Avatar of Member_2_7969923
Member_2_7969923

ASKER

ok what i could fix was the icmp redirect messages because i had a wrong default route for the 192.168.10.0/24

root@maas:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.10.254  0.0.0.0         UG    0      0        0 ens160
10.14.162.0     0.0.0.0         255.255.255.0   U     0      0        0 lxdbr0
10.99.0.0       0.0.0.0         255.255.255.0   U     0      0        0 openstack0
192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 ens160
Avatar of David Favor
https://www.experts-exchange.com/questions/29189398/LXD-containers-infrastructure-on-OVHcloud-setup.html provides directions which consistently produce working LXD networking.
Please update this question as to whether problem is resolved or persists.

Thanks.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.