Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

About the problem that ECS cannot use VIP-SDN, openflow

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Background

Configure the ECS virtual machine with VIP, unable to communicate, why?

HOST A [root@pg11 ~] # ip addr show eth0 2: eth0: mtu 1500 qdisc mq state UP qlen 1000 link/ether 00:16:3e:0a:5c:f1 brd ff:ff:ff:ff:ff:ff inet 172.17.20.29 take 20 brd 172.17.31.255 scope global dynamic eth0 valid_lft 313883835sec preferred_lft 313883835secHOST Bpostgres@pg11- > ip addr show eth0 2: eth0: mtu 1500 qdisc mq state UP qlen 1000 link/ether 00:16 : 3e:12:2f:48 brd ff:ff:ff:ff:ff:ff inet 172.17.20.30 brd 20 brd 172.17.31.255 scope global dynamic eth0 valid_lft 313883847sec preferred_lft 313883847sec on the same VPC (vswitch) Hub)

Can access each other

A ping b ping 172.17.20.29 PING 172.17.20.29 (172.17.20.29) 56 (84) bytes of data. 64 bytes from 172.17.20.29: icmp_seq=1 ttl=64 time=0.156 ms 64 bytes from 172.17.20.29: icmp_seq=2 ttl=64 time=0.102 ms b ping a ping 172.17.20.30 PING 172.17.20.30 (172.17.20.30) 56 (84) bytes of data. 64 bytes from 172.17.20.30: icmp_seq=1 ttl=64 time=0.166 ms 64 bytes from 172.17.20.30: icmp_seq=2 ttl=64 time=0.112 ms

Configure VIP, which cannot be accessed across computers

Host a

[root@pg11 ~] # ip addr add 172.17.20.39 ether 00:16:3e:0a:5c:f1 txqueuelen 20 brd + dev eth0 label eth0:1 [root@pg11] # ifconfig eth0: flags=4163 mtu 1500 inet 172.17.20.29 netmask 255.255.240.0 broadcast 172.17.31.255 ether 00:16:3e:0a:5c:f1 txqueuelen 1000 (Ethernet) RX packets 22221492822 bytes 33552649055304 (30.5 TiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 631860042 bytes 42907936724 (GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 eth0:1: flags=4163 mtu 1500 inet 172.17.20.39 netmask 255.255.240.0 broadcast 172.17.31.255 ether 00:16:3e:0a:5c:f1 txqueuelen 1000 (Ethernet) lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 Loop txqueuelen 1 (Local Loopback) RX packets 959417 bytes 111291935 (106.1 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 959417 bytes 111291935 (106.1 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [root@pg11] # ping 172.17.20.39 PING 172.17.20.39 (172.17.20.39) 56 (84) bytes of data. 64 bytes from 172.17.20.39: icmp_seq=1 ttl=64 time=0.012 ms 64 bytes from 172.17.20.39: icmp_seq=2 ttl=64 time=0.008 ms

Host b

[root@pg11] # ping 172.17.20.39 PING 172.17.20.39 (172.17.20.39) 56 (84) bytes of data.

No firewall

[root@pg11] # iptables-L-v-n Chain INPUT (policy ACCEPT 8 packets, 528 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 6 packets, 1000 bytes) pkts bytes target prot opt in out source destination cause

The host carries out flow control through openflow, and unregistered vm+ip can be rejected. For details, please refer to the SDN documentation.

Delete VIP

[root@pg11 ~] # ip addr del 172.17.20.39 ether 00:16:3e:0a:5c:f1 txqueuelen 20 brd + dev eth0 label eth0:1 [root@pg11] # ifconfig eth0: flags=4163 mtu 1500 inet 172.17.20.29 netmask 255.255.240.0 broadcast 172.17.31.255 ether 00:16:3e:0a:5c:f1 txqueuelen 1000 (Ethernet) RX packets 22221492889 bytes 33552649060975 (30.5 TiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 631860095 bytes 42907943783 TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 loop txqueuelen 1 (Local Loopback) RX packets 959424 bytes 111292619 (106.1 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 959424 bytes 111292619 (106.1 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 referenc

"examples of using linux IP commands"

A Virtual Switch Platform for Host SDN in the Public Cloud

Https://www.microsoft.com/en-us/research/wp-content/uploads/2017/09/login_fall17_02_firestone.pdf

Https://www.opennetworking.org/

Https://www.cisco.com/c/en/us/about/press/internet-protocol-journal/back-issues/table-contents-59/161-sdn.html

Https://en.wikipedia.org/wiki/OpenFlow

Original address: https://github.com/digoal/blog/blob/master/201810/20181005_01.md

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report