ops icon indicating copy to clipboard operation
ops copied to clipboard

dhcp无法获取到IP地址

Open fanux opened this issue 6 years ago • 2 comments

HI,我在执行ovn dhcp.sh时发现dhclient执行时卡住超时,然后也获取不到ip地址,不知道是什么情况?

port1超时, port2提示dhclient已运行

dhclient(19497) is already running - exiting. 

This version of ISC DHCP is based on the release available
on ftp.isc.org.  Features have been added and other changes
have been made to the base software release in order to make
it work better with this distribution.

Please report for this software via the CentOS Bugs Database:
    http://bugs.centos.org/

fanux avatar Jul 18 '19 12:07 fanux

[root@helix105 ovn]# ovn-trace sw1 'inport == "sw1-port1" && eth.src == '00:00:00:00:10:01' && eth.dst == ff:ff:ff:ff:ff:ff && ip4.dst == 255.255.255.255 && udp.src == 68 && udp.dst == 67 && ip.ttl == 1'
# udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:10:01,dl_dst=ff:ff:ff:ff:ff:ff,nw_src=0.0.0.0,nw_dst=255.255.255.255,nw_tos=0,nw_ecn=0,nw_ttl=1,tp_src=68,tp_dst=67

ingress(dp="sw1", inport="sw1-port1")
-------------------------------------
 0. ls_in_port_sec_l2 (ovn-northd.c:4143): inport == "sw1-port1" && eth.src == {00:00:00:00:10:01}, priority 50, uuid 6ba4f1fb
    next;
16. ls_in_l2_lkup (ovn-northd.c:4453): eth.mcast, priority 100, uuid abd95a88
    outport = "_MC_flood";
    output;

multicast(dp="sw1", mcgroup="_MC_flood")
----------------------------------------

    egress(dp="sw1", inport="sw1-port1", outport="sw1-port1")
    ---------------------------------------------------------
            /* omitting output because inport == outport && !flags.loopback */

    egress(dp="sw1", inport="sw1-port1", outport="sw1gw-attachment")
    ----------------------------------------------------------------
         9. ls_out_port_sec_l2 (ovn-northd.c:4597): eth.mcast, priority 100, uuid a59af743
            output;
            /* output to "sw1gw-attachment", type "patch" */

        ingress(dp="lr0", inport="sw1gw")
        ---------------------------------
         0. lr_in_admission (ovn-northd.c:5153): eth.mcast && inport == "sw1gw", priority 50, uuid ecf0f8e4
            next;
         1. lr_in_ip_input (ovn-northd.c:5185): ip4.mcast || ip4.src == 255.255.255.255 || ip4.src == 127.0.0.0/8 || ip4.dst == 127.0.0.0/8 || ip4.src == 0.0.0.0/8 || ip4.dst == 0.0.0.0/8, priority 100, uuid a78a4e32
            drop;

fanux avatar Jul 18 '19 12:07 fanux

发现给ovn端口配置上地址才可以正常通过dhcp拿到地址:

ls-add-port sw0 sw0-port1 "00:00:00:00:00:01 192.168.33.10"

ovn-nbctl lsp-set-addresses $port "$mac"

fanux avatar Jul 19 '19 06:07 fanux