I'm trying to setup a OVN to experiment with the DNS support that is include.  
I created a Logical Switch and a DNS record using "ovn-nbctl create DNS 
records" to create some mappings.  I pointed the Logical Switch field 
dns_records to the DNS records.  But when I tried to do nslookup or dig 
commands through the ports I created on the logical switch, I get no response.  
I know my Switch is working, because I can ping between the 2 ports I created.  
Is there some other setup in ovn-nb or ovn-sb that needs to be setup for ovs to 
respond to DNS requests?  What IP address in in the switch should I be sending 
the DNS requests to.  My subnet is 192.168.50.0/24 and I've tried using dig to 
send requests to 192.168.50.1.  I've tried some other random IP addresses in 
the subnet, but  haven't found the right one.

 

These are the commands I used to setup my network:

 

ovn-nbctl ls-add network1

ovn-nbctl lsp-add network1 vm1

ovn-nbctl lsp-add network1 vm2

ovn-nbctl lsp-set-addresses vm1 "40:44:00:00:00:01 192.168.50.21"

ovn-nbctl lsp-set-addresses vm2 "40:44:00:00:00:02 192.168.50.22"

ovs-vsctl add-port br-int vm1 -- set Interface vm1 type=internal -- set 
Interface vm1 external_ids:iface-id=vm1

ovs-vsctl add-port br-int vm2 -- set Interface vm2 type=internal -- set 
Interface vm2 external_ids:iface-id=vm2

ip netns add vm1

ip link set vm1 netns vm1

ip netns exec vm1 ip link set vm1 address 40:44:00:00:00:01

ip netns exec vm1 ip addr add 192.168.50.21/24 dev vm1

ip netns exec vm1 ip link set vm1 up

ip netns add vm2

ip link set vm2 netns vm2

ip netns exec vm2 ip link set vm2 address 40:44:00:00:00:02

ip netns exec vm2 ip addr add 192.168.50.22/24 dev vm2

ip netns exec vm2 ip link set vm2 up

 

Ping then works:

 

ip netns exec vm2 ping -c2 192.168.50.21

ip netns exec vm1 ping -c2 192.168.50.22

 

Create DNS record:

 

ovn-nbctl show 

switch d780c1e6-8879-4694-aae3-5cf7eb88e55d (network1)

    port vm2

        addresses: ["40:44:00:00:00:02 192.168.50.22"]

    port vm1

        addresses: ["40:44:00:00:00:01 192.168.50.21"]

 

ovn-nbctl create DNS 
records={vm1.vcn1.myvcn.com="192.168.50.21",vm2.vcn1.myvcn.com="192.168.50.22"}

ovn-nbctl list DNS

_uuid               : 8b39857f-1b22-4e66-89d0-5f75f972534c

ovn-nbctl set Logical_Switch d780c1e6-8879-4694-aae3-5cf7eb88e55d 
dns_records=8b39857f-1b22-4e66-89d0-5f75f972534c

 

ip netns exec vm1 nslookup vm1

;; connection timed out; no servers could be reached

 

ip netns exec vm1 dig @192.168.50.1

; <<>> DiG 9.11.4-P2-RedHat-9.11.4-9.P2.el7 <<>> @192.168.50.1

; (1 server found)

;; global options: +cmd

;; connection timed out; no servers could be reached

 

 

John Lang

w (303) 272-5457

c (970) 231-3724

 
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to