Ik ben hier een tijdje bezig met xen. Echter wilde ik een 2tal netwerkkaarten aan m'n virtual machines vastmaken. Ik ga gelijk over op xen termen. Aangezien het mogelijk een xen gerelateerd probleem is. Indien het gewoon een netwerkprobleem is kan je de xen termen skippen en een oplossing geven voor het netwerkprobleem 
Het probleem is kortweg: ik kan met een enkele vif op een domU wel contact van een externe machine krijgen met de domU, maar zodra ik een 2e vif toeken aan de domU met een extra bridge in m'n dom0 krijg ik geen extern contact meer met de domU
publieke adressen zijn gemaskeerd omdat ik geen zin heb om mijn externe adressen op het internet te smijten. Vergeet ook niet dat ik al enkele dagen hier mee aan stoeien ben en ik kan geen verschil meer vinden tussen de getallen. Misschien dat iemand een heel erg opvallend iets ziet wat ik niet meer zie.
Het probleem is kortweg: ik kan met een enkele vif op een domU wel contact van een externe machine krijgen met de domU, maar zodra ik een 2e vif toeken aan de domU met een extra bridge in m'n dom0 krijg ik geen extern contact meer met de domU
publieke adressen zijn gemaskeerd omdat ik geen zin heb om mijn externe adressen op het internet te smijten. Vergeet ook niet dat ik al enkele dagen hier mee aan stoeien ben en ik kan geen verschil meer vinden tussen de getallen. Misschien dat iemand een heel erg opvallend iets ziet wat ik niet meer zie.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
| ----------------------------------------------------------------------
De opzet:
----------------------------------------------------------------------
---------
| winxp |
---------
| /------ dom0 name : atlas
/ eth0 : 192.168.0.180
| / dummy0: x.x.123.4
---------/
| atlas |
| xen | \
--------- ------- domU name : baseinstall
eth0 : x.x.123.9
eth1 : 192.168.0.181
----------------------------------------------------------------------
alle informatie die ik kan vinden op dom0 met een enkele vif
----------------------------------------------------------------------
atlas:~# ip route
x.x.123.0/26 dev dummy0 proto kernel scope link src x.x.123.4
192.168.0.0/24 dev xen-br0 proto kernel scope link src 192.168.0.180
default via 192.168.0.50 dev xen-br0
atlas:~# ip addr
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: dummy0: <BROADCAST,NOARP,UP> mtu 1500 qdisc noqueue
link/ether 9e:59:f0:3c:81:8f brd ff:ff:ff:ff:ff:ff
inet x.x.123.4/26 brd x.x.123.63 scope global dummy0
3: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:bf:d6:57:38 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.180/24 brd 192.168.0.255 scope global eth0
4: xen-br0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
link/ether 00:50:bf:d6:57:38 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.180/32 brd 192.168.0.255 scope global xen-br0
5: vif1.0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
atlas:~# brctl show
bridge name bridge id STP enabled interfaces
xen-br0 8000.0050bfd65738 no eth0
vif1.0
atlas:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
x.x.123.0 0.0.0.0 255.255.255.192 U 0 0 0 dummy0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 xen-br0
0.0.0.0 192.168.0.50 0.0.0.0 UG 0 0 0 xen-br0
atlas:~# brctl showmacs xen-br0
port no mac addr is local? ageing timer
1 00:0b:6a:ad:02:c7 no 128.44
1 00:0c:76:56:b4:c7 no 162.03
1 00:0e:50:3d:9d:17 no 185.88
1 00:0e:a6:23:b9:ad no 0.00
1 00:0e:a6:23:d4:4f no 138.53
1 00:10:60:38:81:fc no 38.61
1 00:50:bf:d6:57:38 yes 0.00
2 aa:00:00:45:f7:1b no 185.88
2 fe:ff:ff:ff:ff:ff yes 0.00
atlas:~# ifconfig
dummy0 Link encap:Ethernet HWaddr 9E:59:F0:3C:81:8F
inet addr:x.x.123.4 Bcast:x.x.123.63 Mask:255.255.255.192
UP BROADCAST RUNNING NOARP 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
eth0 Link encap:Ethernet HWaddr 00:50:BF:D6:57:38
inet addr:192.168.0.180 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:356 errors:0 dropped:0 overruns:0 frame:0
TX packets:437 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:38274 (37.3 KiB) TX bytes:41424 (40.4 KiB)
Interrupt:9 Base address:0xa400
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:684 errors:0 dropped:0 overruns:0 frame:0
TX packets:684 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:39203 (38.2 KiB) TX bytes:39203 (38.2 KiB)
vif1.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26 errors:0 dropped:0 overruns:0 frame:0
TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3567 (3.4 KiB) TX bytes:5964 (5.8 KiB)
xen-br0 Link encap:Ethernet HWaddr 00:50:BF:D6:57:38
inet addr:192.168.0.180 Bcast:192.168.0.255 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:325 errors:0 dropped:0 overruns:0 frame:0
TX packets:403 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:29849 (29.1 KiB) TX bytes:35669 (34.8 KiB)
atlas:~# ip maddr
2: dummy0
link 01:00:5e:00:00:01
3: eth0
link 01:00:5e:00:00:01
4: xen-br0
link 01:00:5e:00:00:01
----------------------------------------------------------------------
alle informatie die ik kan vinden op dom0 met 2 vif’s per domU
----------------------------------------------------------------------
dit is mijn aangepaste config van m'n domU
# Number of network interfaces. Default is 1.
nics=2
# Optionally define mac and/or bridge for the network interfaces.
# Random MACs are assigned if not given.
vif = ['bridge=xen-loc', 'bridge=xen-br0' ]
atlas:~# ip route
x.x.123.0/26 dev xen-loc proto kernel scope link src x.x.123.4
192.168.0.0/24 dev xen-br0 proto kernel scope link src 192.168.0.180
default via 192.168.0.50 dev xen-br0
atlas:~# ip addr
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: dummy0: <BROADCAST,NOARP,UP> mtu 1500 qdisc noqueue
link/ether 3e:8a:bf:84:29:10 brd ff:ff:ff:ff:ff:ff
inet x.x.123.4/26 brd x.x.123.63 scope global dummy0
3: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:bf:d6:57:38 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.180/24 brd 192.168.0.255 scope global eth0
4: xen-br0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
link/ether 00:50:bf:d6:57:38 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.180/32 brd 192.168.0.255 scope global xen-br0
5: xen-loc: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
link/ether 3e:8a:bf:84:29:10 brd ff:ff:ff:ff:ff:ff
inet x.x.123.4/32 brd x.x.123.63 scope global xen-loc
6: vif1.0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
7: vif1.1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
atlas:~# brctl show
bridge name bridge id STP enabled interfaces
xen-br0 8000.0050bfd65738 no eth0
vif1.1
xen-loc 8000.3e8abf842910 no dummy0
vif1.0
atlas:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
x.x.123.0 0.0.0.0 255.255.255.192 U 0 0 0 xen-loc
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 xen-br0
0.0.0.0 192.168.0.50 0.0.0.0 UG 0 0 0 xen-br0
atlas:~# brctl showmacs xen-br0
port no mac addr is local? ageing timer
1 00:0e:50:3d:9d:17 no 87.86
1 00:0e:a6:23:b9:ad no 0.00
1 00:0e:a6:23:d4:4f no 112.76
1 00:50:bf:d6:57:38 yes 0.00
2 aa:00:00:64:e1:d7 no 108.50
2 fe:ff:ff:ff:ff:ff yes 0.00
atlas:~# brctl showmacs xen-loc
port no mac addr is local? ageing timer
1 3e:8a:bf:84:29:10 yes 0.00
2 aa:00:00:64:e1:d7 no 78.24
2 fe:ff:ff:ff:ff:ff yes 0.00
atlas:~# ifconfig
dummy0 Link encap:Ethernet HWaddr 3E:8A:BF:84:29:10
inet addr:x.x.123.4 Bcast:x.x.123.63 Mask:255.255.255.192
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:1876 (1.8 KiB)
eth0 Link encap:Ethernet HWaddr 00:50:BF:D6:57:38
inet addr:192.168.0.180 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:159 errors:0 dropped:0 overruns:0 frame:0
TX packets:207 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16966 (16.5 KiB) TX bytes:19507 (19.0 KiB)
Interrupt:9 Base address:0xa400
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:828 errors:0 dropped:0 overruns:0 frame:0
TX packets:828 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:47336 (46.2 KiB) TX bytes:47336 (46.2 KiB)
vif1.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:42 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1876 (1.8 KiB) TX bytes:280 (280.0 b)
vif1.1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:1 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:182 (182.0 b) TX bytes:326 (326.0 b)
xen-br0 Link encap:Ethernet HWaddr 00:50:BF:D6:57:38
inet addr:192.168.0.180 Bcast:192.168.0.255 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:149 errors:0 dropped:0 overruns:0 frame:0
TX packets:199 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:13668 (13.3 KiB) TX bytes:18129 (17.7 KiB)
xen-loc Link encap:Ethernet HWaddr 3E:8A:BF:84:29:10
inet addr:x.x.123.4 Bcast:x.x.123.63 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:42 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1288 (1.2 KiB) TX bytes:280 (280.0 b)
atlas:~# ip maddr
2: dummy0
link 01:00:5e:00:00:01
3: eth0
link 01:00:5e:00:00:01
4: xen-br0
link 01:00:5e:00:00:01
5: xen-loc
link 01:00:5e:00:00:01
----------------------------------------------------------------------
De TCPdumps met een dubbele vif op alle relevante interfaces
----------------------------------------------------------------------
running ping 192.168.0.181 from external box (winxp)
atlas:~# tcpdump 'icmp or arp' -n -i eth0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
18:48:28.875891 arp who-has 192.168.0.181 tell 192.168.0.52
18:48:28.877460 arp reply 192.168.0.181 is-at aa:00:00:64:e1:d7
18:48:28.877506 IP 192.168.0.52 > 192.168.0.181: icmp 40: echo request seq 22272
18:48:34.117703 IP 192.168.0.52 > 192.168.0.181: icmp 40: echo request seq 22528
18:48:34.117955 arp who-has 192.168.0.52 tell 192.168.0.181
18:48:34.118032 arp reply 192.168.0.52 is-at 00:0e:a6:23:b9:ad
18:48:39.586215 IP 192.168.0.52 > 192.168.0.181: icmp 40: echo request seq 22784
18:48:45.039124 IP 192.168.0.52 > 192.168.0.181: icmp 40: echo request seq 23040
atlas:~# tcpdump 'icmp or arp' -n -i xen-br0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on xen-br0, link-type EN10MB (Ethernet), capture size 96 bytes
18:49:41.755115 IP 192.168.0.52 > 192.168.0.181: icmp 40: echo request seq 23296
18:49:41.755388 IP 192.168.0.181 > 192.168.0.52: icmp 40: echo reply seq 23296
18:49:44.308907 arp who-has 192.168.0.50 tell 192.168.0.53
18:49:46.754424 arp who-has 192.168.0.52 tell 192.168.0.181
18:49:46.754548 arp reply 192.168.0.52 is-at 00:0e:a6:23:b9:ad
18:49:47.005364 IP 192.168.0.52 > 192.168.0.181: icmp 40: echo request seq 23552
18:49:47.005502 IP 192.168.0.181 > 192.168.0.52: icmp 40: echo reply seq 23552
18:49:52.442648 IP 192.168.0.52 > 192.168.0.181: icmp 40: echo request seq 23808
18:49:52.442881 IP 192.168.0.181 > 192.168.0.52: icmp 40: echo reply seq 23808
18:49:57.911188 IP 192.168.0.52 > 192.168.0.181: icmp 40: echo request seq 24064
18:49:57.911416 IP 192.168.0.181 > 192.168.0.52: icmp 40: echo reply seq 24064
18:50:01.313560 arp who-has 192.168.0.29 tell 192.168.0.29
tcpdump: WARNING: vif1.1: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on vif1.1, link-type EN10MB (Ethernet), capture size 96 bytes
18:50:32.891190 IP 192.168.0.52 > 192.168.0.181: icmp 40: echo request seq 24576
18:50:32.891465 IP 192.168.0.181 > 192.168.0.52: icmp 40: echo reply seq 24576
18:50:38.222152 IP 192.168.0.52 > 192.168.0.181: icmp 40: echo request seq 24832
18:50:38.222344 IP 192.168.0.181 > 192.168.0.52: icmp 40: echo reply seq 24832
18:50:43.721882 IP 192.168.0.52 > 192.168.0.181: icmp 40: echo request seq 25088
18:50:43.722039 IP 192.168.0.181 > 192.168.0.52: icmp 40: echo reply seq 25088
18:50:49.174790 IP 192.168.0.52 > 192.168.0.181: icmp 40: echo request seq 25344
18:50:49.174960 IP 192.168.0.181 > 192.168.0.52: icmp 40: echo reply seq 25344 |