sysml / clickos

The Click modular router: fast modular packet processing and analysis
http://www.read.cs.ucla.edu/click/
Other
136 stars 35 forks source link

No related output about package with xl console #11

Closed wj92 closed 9 years ago

wj92 commented 9 years ago

This is configuration of domain-u: name = 'vm4' kernel = '/root/xen/clickos/minios/build/clickos_x86_64' vcpus = '1'

cpus = '3'

memory = '16'

uncoment this line if you wish to use our backend

vif = ['ip=192.168.1.201,mac=08:00:27:1c:aa:10,bridge=vale0,script=/etc/xen/scripts/vif-vale']

vif = ['ip=192.168.1.200,mac=08:00:27:1c:aa:09,bridge=vale0']

on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'preserve'
click = 'vm4.click'

then I use vale-ctl to show connection:

bdg_ctl [98] bridge:0 port:0 vale0:eth0 bdg_ctl [98] bridge:0 port:1 vale0:vif1.0

after the above operation,I open another terminal,input command ping 192.168.1.201:

PING 192.168.1.201 (192.168.1.201) 56(84) bytes of data. From 192.168.1.162 icmp_seq=1 Destination Host Unreachable From 192.168.1.162 icmp_seq=2 Destination Host Unreachable From 192.168.1.162 icmp_seq=3 Destination Host Unreachable From 192.168.1.162 icmp_seq=4 Destination Host Unreachable From 192.168.1.162 icmp_seq=5 Destination Host Unreachable From 192.168.1.162 icmp_seq=6 Destination Host Unreachable From 192.168.1.162 icmp_seq=7 Destination Host Unreachable From 192.168.1.162 icmp_seq=8 Destination Host Unreachable From 192.168.1.162 icmp_seq=9 Destination Host Unreachable

then I use xl console vm4:

Xen Minimal OS! start_info: 0x2ea000(VA) nr_pages: 0x1000 shared_inf: 0xac783000(MA) pt_base: 0x2ed000(VA) nr_pt_frames: 0x5 mfn_list: 0x2e2000(VA) mod_start: 0x0(VA) mod_len: 0 flags: 0x0 cmd_line: stack: 0x23af40-0x25af40 MM: Init _text: 0x0(VA) _etext: 0xe8826(VA) _erodata: 0x163000(VA) _edata: 0x164bb8(VA) stack start: 0x23af40(VA) _end: 0x2e1010(VA) start_pfn: 2f5 max_pfn: 1000 Mapping memory range 0x400000 - 0x1000000 setting 0x0-0x163000 readonly skipped 0x1000 MM: Initialise page allocator for 2fb000(2fb000)-1000000(1000000) MM: done Demand map pfns at 1001000-2001001000. Heap resides at 2001002000-4001002000. Initialising timer interface Initialising console ... done. gnttab_table mapped at 0x1001000. Initialising scheduler Thread "Idle": pointer: 0x2001002050, stack: 0x310000 Thread "xenstore": pointer: 0x2001002800, stack: 0x320000 xenbus initialised on irq 1 mfn 0xac493 Thread "shutdown": pointer: 0x2001002fb0, stack: 0x330000 Dummy main: start_info=0x25af40 Thread "main": pointer: 0x2001003760, stack: 0x340000 sparsing 0MB at 177000 "main" [on_status:205] router id 0 [on_status:206] status change to Running Thread "click": pointer: 0x2001010a00, stack: 0x360000 backend dom 0 Mapping TX rings 0 map errors Mapping RX rings 0 map errors Mapping TX buffers 0 map errors Mapping RX buffers 0 map errors init_netfront_netmap device/vif/0 Waiting for /local/domain/0/backend/vif/3/0/state change to connected unmasking event-channel-tx 4 unmasking event-channel-rx 5 [router_thread:157] Starting driver...

[on_status:205] router id 1 [on_status:206] status change to Running Thread "click": pointer: 0x20010262c0, stack: 0x390000 Replacing netif_rx handler for dev device/vif/0 [router_thread:157] Starting driver...

I wonder why there is no information about package?Is anything wrong with my configuration?what should I do?

jpemartins commented 9 years ago

Since you are using xennet, the standard tools that use the host stack won't work. Your options would be: 1) you either built your tools with netmap API; 2) you are the other host (where your eth0 is connected) 3) to boot another guest with a ping configuration (example below). The latter is the quickest wat, but it is expected that you have proper ICMP handling in your click config (something like the ponger config). Which config are you booting up?

// Pinger configuration
// IP addresses configured according to ponger.click
define($IP 10.10.0.2);
define($MAC 00:15:17:15:5d:79);
define($DADDR 10.10.0.3);

    source :: FromDevice;
    sink   :: ToDevice;
    c :: Classifier( 12/0806 20/0001, 12/0806 20/0002, 12/0800, -);
    arpq :: ARPQuerier($IP, $MAC);
    arpr :: ARPResponder($IP $MAC);
    q :: Queue

    source -> c;
    c[0] -> ARPPrint -> arpr -> q;
    c[1] -> [1]arpq;
    c[2] -> CheckIPHeader(14) 
    -> ip :: IPClassifier(icmp echo-reply)
    -> ping :: ICMPPingSource($IP, $DADDR) 
    -> SetIPAddress($DADDR)
    -> arpq
    -> IPPrint
    -> q
    -> sink;
    arpq[1] -> ARPPrint -> q;
    c[3] -> Discard;
wj92 commented 9 years ago

Hi: I follow your advice.But I do not get desired result. The configuration of vm1 and click1(same as ponger):

name = 'vm1' kernel = '/root/xen/clickos/minios/build/clickos_x86_64' vcpus = '1' memory = '16' vif = ['ip=192.168.1.200,mac=08:00:27:1c:aa:09,bridge=vale0,script=/etc/xen/scripts/vif-vale'] on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'preserve'
click = 'vm1.click

define($IP 192.168.1.200); define($MAC 08:00:27:1c:aa:09);

source::FromDevice; sink::ToDevice;

c::Classifier( 12/0806 20/0001, 12/0806 20/0002, 12/0800, -);

arpq::ARPQuerier($IP,$MAC); arpr::ARPResponder($IP $MAC);

source->c; c[0]->ARPPrint->arpr->sink; c[1]->[1]arpq; Idle->[0]arpq; arpq->ARPPrint->sink; c[2]->CheckIPHeader(14)->ICMPPingResponder()->EtherMirror()->sink; c[3]->Discard;

The configuration of vm2 and click2(same as your description):

name = 'vm2' kernel = '/root/xen/clickos/minios/build/clickos_x86_64' vcpus = '1' memory = '16' vif = ['ip=192.168.1.201,mac=08:00:27:1c:aa:10,bridge=vale0,script=/etc/xen/scripts/vif-vale'] on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'preserve'
click = 'vm2.click'

define($IP 192.168.1.201); define($MAC 08:00:27:1c:aa:10); define($DADDR 192.168.1.200);

source :: FromDevice; sink :: ToDevice; c :: Classifier( 12/0806 20/0001, 12/0806 20/0002, 12/0800, -); arpq :: ARPQuerier($IP, $MAC); arpr :: ARPResponder($IP $MAC); q :: Queue

source -> c; c[0] -> ARPPrint -> arpr -> q; c[1] -> [1]arpq; c[2] -> CheckIPHeader(14) -> ip :: IPClassifier(icmp echo-reply) -> ping :: ICMPPingSource($IP, $DADDR) -> SetIPAddress($DADDR) -> arpq -> IPPrint -> q -> sink; arpq[1] -> ARPPrint -> q; c[3] -> Discard;

But when I xl console vm1 ,there is no output about package,xl console vm2 get the some result as vm1:

Xen Minimal OS! start_info: 0x2ea000(VA) nr_pages: 0x1000 shared_inf: 0xb26df000(MA) pt_base: 0x2ed000(VA) nr_pt_frames: 0x5 mfn_list: 0x2e2000(VA) mod_start: 0x0(VA) mod_len: 0 flags: 0x0 cmd_line: stack: 0x23af40-0x25af40 MM: Init _text: 0x0(VA) _etext: 0xe8826(VA) _erodata: 0x163000(VA) _edata: 0x164bb8(VA) stack start: 0x23af40(VA) _end: 0x2e1010(VA) start_pfn: 2f5 max_pfn: 1000 Mapping memory range 0x400000 - 0x1000000 setting 0x0-0x163000 readonly skipped 0x1000 MM: Initialise page allocator for 2fb000(2fb000)-1000000(1000000) MM: done Demand map pfns at 1001000-2001001000. Heap resides at 2001002000-4001002000. Initialising timer interface Initialising console ... done. gnttab_table mapped at 0x1001000. Initialising scheduler Thread "Idle": pointer: 0x2001002050, stack: 0x310000 Thread "xenstore": pointer: 0x2001002800, stack: 0x320000 xenbus initialised on irq 1 mfn 0xa96de Thread "shutdown": pointer: 0x2001002fb0, stack: 0x330000 Dummy main: start_info=0x25af40 Thread "main": pointer: 0x2001003760, stack: 0x340000 sparsing 0MB at 177000 "main" [on_status:205] router id 0 [on_status:206] status change to Running Thread "click": pointer: 0x2001010ba0, stack: 0x360000 backend dom 0 Mapping TX rings 0 map errors Mapping RX rings 0 map errors Mapping TX buffers 0 map errors Mapping RX buffers 0 map errors init_netfront_netmap device/vif/0 Waiting for /local/domain/0/backend/vif/1/0/state change to connected [on_status:205] router id 1 [on_status:206] status change to Running Thread "click": pointer: 0x2001027990, stack: 0x390000 backend dom 0 Mapping TX rings 0 map errors Mapping RX rings 0 map errors Mapping TX buffers 0 map errors Mapping RX buffers 0 map errors init_netfront_netmap device/vif/0 Waiting for /local/domain/0/backend/vif/1/0/state change to connected

Xen Minimal OS! start_info: 0x2ea000(VA) nr_pages: 0x1000 shared_inf: 0xacf96000(MA) pt_base: 0x2ed000(VA) nr_pt_frames: 0x5 mfn_list: 0x2e2000(VA) mod_start: 0x0(VA) mod_len: 0 flags: 0x0 cmd_line: stack: 0x23af40-0x25af40 MM: Init _text: 0x0(VA) _etext: 0xe8826(VA) _erodata: 0x163000(VA) _edata: 0x164bb8(VA) stack start: 0x23af40(VA) _end: 0x2e1010(VA) start_pfn: 2f5 max_pfn: 1000 Mapping memory range 0x400000 - 0x1000000 setting 0x0-0x163000 readonly skipped 0x1000 MM: Initialise page allocator for 2fb000(2fb000)-1000000(1000000) MM: done Demand map pfns at 1001000-2001001000. Heap resides at 2001002000-4001002000. Initialising timer interface Initialising console ... done. gnttab_table mapped at 0x1001000. Initialising scheduler Thread "Idle": pointer: 0x2001002050, stack: 0x310000 Thread "xenstore": pointer: 0x2001002800, stack: 0x320000 xenbus initialised on irq 1 mfn 0xacca6 Thread "shutdown": pointer: 0x2001002fb0, stack: 0x330000 Dummy main: start_info=0x25af40 Thread "main": pointer: 0x2001003760, stack: 0x340000 sparsing 0MB at 177000 "main" [on_status:205] router id 0 [on_status:206] status change to Running Thread "click": pointer: 0x2001010a00, stack: 0x360000 backend dom 0 Mapping TX rings 0 map errors Mapping RX rings 0 map errors Mapping TX buffers 0 map errors Mapping RX buffers 0 map errors init_netfront_netmap device/vif/0 Waiting for /local/domain/0/backend/vif/2/0/state change to connected [on_status:205] router id 1 [on_status:206] status change to Running Thread "click": pointer: 0x2001028420, stack: 0x390000 backend dom 0 Mapping TX rings 0 map errors Mapping RX rings 0 map errors Mapping TX buffers 0 map errors Mapping RX buffers 0 map errors init_netfront_netmap device/vif/0 Waiting for /local/domain/0/backend/vif/2/0/state change to connected

then I use xl list,I find they are blocked

Name ID Mem VCPUs State Time(s) Domain-0 0 5888 4 r----- 196.4 vm1 1 16 1 -b---- 0.0 vm2 2 16 1 -b---- 0.0

But I have used cosmos start vm1 vm1.click and cosmos start vm2 vm2.click before.

jpemartins commented 9 years ago

You seem to start two routers in each VM. You can either insert the click = 'vm0.click' entry in your vm1.cfg or do cosmos start vm1 vm1.click (same applies to vm2). If you do both, you will start the router twice. ClickOS haven't been tested enough to run two routers that so I am not sure if it might lead to a weird behaviour. State blocked is because the optimized netfront will wait when you don't receive packets for a certain period.

jpemartins commented 9 years ago

One other thing: If ClickOS gets stucked here Waiting for /local/domain/0/backend/vif/2/0/state change to connected might be that's something is wrong in the interface setup or a potential bug. If that's the case check dmesg or in /var/log/xen/xen-hotplug.log to see if something is wrong.

The router starts successfully when you see (like in your first example)

[router_thread:157] Starting driver...
fmanco commented 9 years ago

Given the lack of activity I'll close this. Feel free to re-open if necessary!