Hi Ben, I am sorry fo rmy spell mistake. It is h1-eth0. My simple topology is as follows:
[image: Inline image 1] After starting openvswitch, I add eth0 (internet interface) to the openvswitch. Then run the command "ifconfig eth0 0.0.0.0" to make eth0 as an openvswitch port. Next run the command "dhclient s1". It seems that the port s1 becomes the Internet interface and gets the IP "10.0.2.15" Now I can ping outside website from VM. If I want to ping outside website on H1/H1, I need also run the command "dhclient h1-eth0/h2-eth0" on H1/H2. The route table of H1 is as follows: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 10.0.2.2 0.0.0.0 UG 0 0 0 h1-eth0 10.0.0.0 * 255.0.0.0 U 0 0 0 h1-eth0 10.0.2.0 * 255.255.255.0 U 0 0 0 h1-eth0 It seems that the port "s1" of the openvswitch "s1" has become a real bridge of eth0. Eth0 become an internal port of the openvswitch. Best Regards, Bruce On Thu, Jul 31, 2014 at 10:27 PM, Ben Pfaff <b...@nicira.com> wrote: > On Thu, Jul 31, 2014 at 05:11:34PM +0100, Bruce SUN wrote: > > I just run "h1 dhclient h1-eht0". The problem is solved, but I don't know > > the reason. > > mininet> h2 ping www.sina.com > > PING wwwus.sina.com (12.130.132.30) 56(84) bytes of data. > > 64 bytes from 12.130.132.30: icmp_seq=2 ttl=238 time=173 ms > > 64 bytes from 12.130.132.30: icmp_seq=3 ttl=238 time=167 ms > > 64 bytes from 12.130.132.30: icmp_seq=4 ttl=238 time=166 ms > > This is the first you've mentioned an interface h1-eht0 (or h1-eth0). > Where does it come from? > > > mininet@mininet-vm:~$ ping www.sina.com > > PING wwwus.sina.com (12.130.132.30) 56(84) bytes of data. > > 64 bytes from 12.130.132.30: icmp_seq=1 ttl=238 time=173 ms > > 64 bytes from 12.130.132.30: icmp_seq=2 ttl=238 time=172 ms > > > > Could you tell me what is function of the port (the name is the same as > > openvswitch bridge, like s1)? I am confused about the port. It seems > > meaningless except here. > > Suppose that IP addresses were assigned to physical interfaces instead > of internal interfaces. This has a straightforward interpretation for > packets destined to that IP address that arrive on the physical > interface. But what about packets destined to that IP address that > arrive on some other port on the bridge? It would not make sense for > those packets to automatically be received on the IP address, because > that would prevent configuring the switch to do something else. And an > action to output the packet on the physical port would naturally mean to > transmit it out on the physical wire. So, basically, assigning an IP > address to a physical port raises a lot of questions. >
_______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss