qemu PPP连接
生活随笔
收集整理的這篇文章主要介紹了
qemu PPP连接
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
呵呵,出差最大的好處就是不用安排時間陪老婆大人:)
用QEMU虛擬兩臺串口連接設備,利用UDP模擬串口。再在串口上配置pppd。這樣就模擬簡單路由器就有戲了:)
? 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系統上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系統,其中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淵遠流長,pppd相關文檔集中于撥號領域,要簡明還真的很難。如上命令顯然不是很嚴謹,不過演示而已。
下一步,當然是quagga on gentoo了:)
轉載于:https://blog.51cto.com/netos/148627
總結
以上是生活随笔為你收集整理的qemu PPP连接的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: PCB传输线阻抗计算工具Polar Si
- 下一篇: Android基于mAppWidget实