60 123
发新话题
打印

[分享] qemu新版

qemu新版

新版qemu,应该能支持bgp和ospf了(tcp和udp)。请大家测试。采用mmm123原文件部分代码。

内含bin文件,我的命令行,和原文件,替换qemu安装文件hw文件夹中同名文件再重新编译即可。
我是在2007-08-24版测试的,不知道在最新版上行不行。
qemu下载地址
http://qemu-forum.ipi.fi/qemu-snapshots/qemu-snapshot-2007-09-16_05.tar.bz2

附件

1.rar (3.92 MB)

2007-9-17 08:25, 下载次数: 724 , 阅读权限: 10

TOP

沙发。感谢。

TOP

我根据楼主提供的信息编译的Windows版本。供大家测试。

启动命令参考:
juniper.exe -L . -m 256 -hda E:\VMOS\juniper\junos8.3.vmdk -boot c -localtime -net nic,vlan=3,macaddr=00:aa:00:00:01:03,model=i82559er -net tap,vlan=3,ifname=tap2 -net nic,vlan=2,macaddr=00:aa:00:00:01:02,model=i82559er -net tap,vlan=2,ifname=tap1 -net nic,vlan=1,macaddr=00:aa:00:00:01:01,model=i82559er -net tap,vlan=1,ifname=tap0 -kernel-kqemu -serial [url=telnet::1007,server]telnet::1007,server[/url]


附件: qemuforJuniper.rar (396.26 KB)

TOP

倒,加了一个参数model=i82559er ,呵呵,刚开始没有看到,没有加,结果起动完了没有物理接口,一个都不在了。

TOP

呵呵,是的。这点改变忘了说了。

TOP

引用:
原帖由 myios 于 2007-9-17 11:16 发表
呵呵,是的。这点改变忘了说了。
老大,命令行的tap网卡和Juniper的网卡对应次序不对了,能不能修改一下这个问题?

TOP

测试了一下,BGP 邻居建立确实没有问题了,但是LDP session好象还是不行的。
root> show bgp summary logical-router ce1  
Groups: 2 Peers: 2 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0                 1          0          0          0          0          0
Peer               AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Damped...
192.255.197.17    300         15         20       0       0        6:38 Establ
  inet.0: 0/1/0
10.255.255.177    200          7          8       0       0        5:35 Establ
  inet.0: 0/0/0
root>
root>
root>
root>
root> show bgp neighbor logical-router ce1
Peer: 192.255.197.17+179 AS 300 Local: 192.255.197.18+1997 AS 200  
  Type: External    State: Established    Flags: <ImportEval Sync>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Export: [ internal ]
  Options: <Preference HoldTime AddressFamily PeerAS Refresh>
  Address families configured: inet-labeled-unicast
  Holdtime: 180 Preference: 170
  Number of flaps: 0
  Peer ID: 192.255.197.17   Local ID: 10.255.255.179   Active Holdtime: 90
  Keepalive Interval: 30         Peer index: 0   
  Local Interface: fxp1.45                          
  NLRI advertised by peer: inet-labeled-unicast
  NLRI for this session: inet-labeled-unicast
  Peer supports Refresh capability (2)
  Table inet.0 Bit: 10000
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              0
    Received prefixes:            1
    Suppressed due to damping:    0
    Advertised prefixes:          6
  Last traffic (seconds): Received 13   Sent 24   Checked 24  
  Input messages:  Total 15     Updates 1       Refreshes 0     Octets 321
  Output messages: Total 20     Updates 5       Refreshes 0     Octets 638
  Output Queue[0]: 0
Peer: 10.255.255.177+3217 AS 200 Local: 10.255.255.179+179 AS 200  
  Type: Internal    State: Established    Flags: <ImportEval Sync>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Options: <Preference LocalAddress HoldTime AddressFamily Refresh>
  Address families configured: inet-labeled-unicast
  Local Address: 10.255.255.179 Holdtime: 180 Preference: 170
  Number of flaps: 0
  Peer ID: 10.255.255.177   Local ID: 10.255.255.179   Active Holdtime: 180
  Keepalive Interval: 60         Peer index: 0   
  NLRI advertised by peer: inet-labeled-unicast
  NLRI for this session: inet-labeled-unicast
  Peer supports Refresh capability (2)
  Table inet.0 Bit: 10001
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              0
    Received prefixes:            0
    Suppressed due to damping:    0
    Advertised prefixes:          0
  Last traffic (seconds): Received 40   Sent 40   Checked 40  
  Input messages:  Total 7      Updates 0       Refreshes 0     Octets 159
  Output messages: Total 8      Updates 0       Refreshes 0     Octets 178
  Output Queue[0]: 0
root>

root> show ldp neighbor logical-router p2  
Address            Interface          Label space ID         Hold time
192.255.198.1      fxp1.34            10.255.255.179:0         11
192.255.198.9      fxp2.23            10.255.255.177:0         10

root> show ldp session logical-router p2
  Address           State        Connection     Hold time
10.255.255.177      Operational  Open             20
10.255.255.179      Operational  Open             20
root>
root> show ldp session detail logical-router p2
Address: 10.255.255.177, State: Operational, Connection: Open, Hold time: 21
  Session ID: 10.255.255.175:0--10.255.255.177:0
  Next keepalive in 1 seconds
  Passive, Maximum PDU: 4096, Hold time: 30, Neighbor count: 1
  Keepalive interval: 10, Connect retry interval: 1
  Local address: 10.255.255.175, Remote address: 10.255.255.177
  Up for 00:07:11
  Local - Restart: disabled, Helper mode: enabled
  Remote - Restart: disabled, Helper mode: enabled
  Local maximum recovery time: 240000 msec
  Next-hop addresses received:
    192.255.198.9
Address: 10.255.255.179, State: Operational, Connection: Open, Hold time: 21
  Session ID: 10.255.255.175:0--10.255.255.179:0
  Next keepalive in 1 seconds
  Passive, Maximum PDU: 4096, Hold time: 30, Neighbor count: 1
  Keepalive interval: 10, Connect retry interval: 1
  Local address: 10.255.255.175, Remote address: 10.255.255.179
  Up for 00:07:11
  Local - Restart: disabled, Helper mode: enabled
  Remote - Restart: disabled, Helper mode: enabled
  Local maximum recovery time: 240000 msec
  Next-hop addresses received:
    192.255.198.1
root>

总的来说还是有很不错的呀,BGP可以正常使用了。期待myios能对LDP的问题抽空再看看。
不知道坛子里其他人有没有LDP session正常的?

TOP

引用:
原帖由 ronsun 于 2007-9-17 11:37 发表

老大,命令行的tap网卡和Juniper的网卡对应次序不对了,能不能修改一下这个问题?
就是不对应,和以前的版本又变了,起动起来发现直连之间不通,结果一看物理接口和脚本不一直,没办法,修改,重起。这是我的脚本:

juniper.exe -L . -m 256 -hda ..\images\oliver.vmdk -boot c -localtime  -net nic,vlan=2,macaddr=00:aa:00:00:01:01,model=i82559er  -net tap,vlan=2,ifname=tap0 -net nic,vlan=3,macaddr=00:aa:00:00:01:02,model=i82559er  -net tap,vlan=3,ifname=tap1 -net nic,vlan=3,macaddr=00:aa:00:00:01:03,model=i82559er  -net tap,vlan=3,ifname="tap2" -serial [url=telnet::2020,server,nowait]telnet::2020,server,nowait[/url]
pause

TOP

哦。ldp是基于tcp的吗?我对这个不是很清楚。

TOP

恩,是的,LDP协议的hello报文是UDP发送的,通过发送hello报文,发现邻居,然后使用TCP建立session,LDP协议TCP和UDP都使用。

TOP

myios,不好意思,我弄错了,LDP没有问题。

TOP

伟大的进展,看起来能做MPLS VPN了

TOP

引用:
原帖由 wanzxj 于 2007-9-17 12:32 发表
myios,不好意思,我弄错了,LDP没有问题。
把你的配置贴出来看看哈。thank you .

TOP

不知道怎么感谢MYISO才好呀,问题觉得解决了!很多的试验都可以很方便地进行啦,哈哈。

我的BGP & OSPF CONFIGURATION:

root> show configuration
## Last commit: 2007-09-17 13:26:15 UTC by root
version 8.3R2.8;
system {
    root-authentication {
        encrypted-password "$1$h1exJ00p$a8TT/s.VKWtxI8cWBVwtS1"; ## SECRET-DATA
    }
    services {
        telnet;
    }
    syslog {
        user * {
            any emergency;
        }
        file messages {
            any notice;
            authorization info;
        }
        file interactive-commands {
            interactive-commands any;
        }
    }
}
logical-routers {
    r1 {
        interfaces {
            fxp1 {
                unit 11 {
                    vlan-id 11;
                    family inet {
                        address 192.168.1.1/24;
                    }
                }
            }
            lo0 {
                unit 1 {
                    family inet {
                        address 1.1.1.1/32;
                    }
                }
            }
        }
        protocols {
            bgp {
                multihop;
                export ospf;
                group internal {
                    type internal;
                    local-address 1.1.1.1;
                    neighbor 2.2.2.2;
                }
            }
            ospf {
                export ospf;
                area 0.0.0.0 {
                    interface all;
                }
            }
        }
        policy-options {
            policy-statement ospf {
                term 1 {
                    from interface [ fxp1.11 lo0.1 ];
                    then accept;
                }
            }
        }
        routing-options {
            router-id 1.1.1.1;
            autonomous-system 65500;
        }
    }
    r2 {
        interfaces {
            fxp2 {
                unit 11 {
                    vlan-id 11;
                    family inet {
                        address 192.168.1.2/24;
                    }
                }
            }
            lo0 {
                unit 2 {
                    family inet {
                        address 2.2.2.2/32;
                    }
                }
            }
        }
        protocols {
            bgp {
                multihop;
                export ospf;
                group internal {
                    type internal;
                    local-address 2.2.2.2;
                    neighbor 1.1.1.1;
                }
            }
            ospf {
                export ospf;
                area 0.0.0.0 {
                    interface all;
                }
            }
        }
        policy-options {
            policy-statement ospf {
                term 1 {
                    from {
                        protocol static;
                        interface [ fxp2.11 lo0.2 ];
                    }
                    then accept;
                }
            }
        }
        routing-options {
            router-id 2.2.2.2;
            autonomous-system 65500;
        }
    }
    r3;
}
interfaces {
    fxp0 {
        vlan-tagging;
    }
    fxp1 {
        vlan-tagging;
    }
    fxp2 {
        vlan-tagging;
    }
}

root>

TOP

原的版本是不是tcp连接延时太大了呀?
myiso,u are great! 高手就是不一样

TOP

我没有做什么,在qemu本身上加了mmm123的代码而已。呵呵。算是搞了个集成。

TOP

7.4的版本,ospf邻居起不来。

TOP

呵呵,不可能的
我的就是7.4。

root> show version
Model: olive
JUNOS Base OS boot [7.4R1.7]
JUNOS Base OS Software Suite [7.4R1.7]
JUNOS Kernel Software Suite [7.4R1.7]
JUNOS Packet Forwarding Engine Support (M20/M40) [7.4R1.7]
JUNOS Routing Software Suite [7.4R1.7]
JUNOS Online Documentation [7.4R1.7]


root> show ospf neighbor   
OSPF instance is not running

root> show ospf neighbor logical-router p2
  Address         Interface             State      ID              Pri  Dead
192.255.198.1    fxp1.34                Full      10.255.255.179   128    35
192.255.198.9    fxp2.23                Full      10.255.255.177   128    32

TOP

wanzxj
你帮我看看这个里面的BGP有什么问题没有?上个星期弄出了一个QEMU版本.
http://www.netemu.cn/bbs/thread-5153-1-1.html

[ 本帖最后由 锅巴粥 于 2007-9-17 14:13 编辑 ]

TOP

呵呵,没有问题呀,你的BGP 邻居已经建立起来了。

root# run show bgp neighbor logical-router all

logical-router: r1
Peer: 10.0.31.1+179 AS 65505   Local: 10.0.31.2+4240 AS 65500
  Type: External    State: Established    Flags:

看来你编译的版本和myios都一样。都可以正常使用。

TOP

 60 123
发新话题