qemu PPP连接
生活随笔
收集整理的這篇文章主要介紹了
qemu PPP连接
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
呵呵,出差最大的好處就是不用安排時(shí)間陪老婆大人:)
用QEMU虛擬兩臺(tái)串口連接設(shè)備,利用UDP模擬串口。再在串口上配置pppd。這樣就模擬簡(jiǎn)單路由器就有戲了:)
? host--eth-RT1---serial---RT2---eth--Host
RT1 qemu配置:
qemu-system-x86_64 -M pc -m 64 -hda ./rtimg.1 \
??? -k en-us \
??? -net nic,vlan=0 -net tap,ifname=tap0,vlan=0 \
??? -serial udp:127.0.0.1:7001@127.0.0.1:7002 \
??? -boot c &
RT2 qemu配置:
qemu-system-x86_64 -M pc -m 64 -hda ./rtimg.2 \
??? -k en-us \
??? -net nic,vlan=0 -net tap,ifname=tap1,vlan=0 \
??? -serial udp:127.0.0.1:7002@127.0.0.1:7001 \
??? -boot c &
Host系統(tǒng)上TAP接口配置如下:
z00895@z00895u:~/app/nds/RT1-RT2$ cat /etc/network/interfaces
~~~~~
auto tap0
iface tap0 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user XXX
auto tap1
iface tap1 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user XXX
~~~~~
rtimg.1 與rtimg.2均安裝gentoo系統(tǒng),其中ppp配置為:
pppd? 10.0.1.1:10.0.1.2 /dev/ttyS0 38400 &
pppd? 10.0.1.2:10.0.1.1 /dev/ttyS0 38400 &
unix/linux淵遠(yuǎn)流長(zhǎng),pppd相關(guān)文檔集中于撥號(hào)領(lǐng)域,要簡(jiǎn)明還真的很難。如上命令顯然不是很嚴(yán)謹(jǐn),不過(guò)演示而已。
下一步,當(dāng)然是quagga on gentoo了:)
轉(zhuǎn)載于:https://blog.51cto.com/netos/148627
總結(jié)
以上是生活随笔為你收集整理的qemu PPP连接的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: PCB传输线阻抗计算工具Polar Si
- 下一篇: 今天去团省委维护网站