1、先用调试线连接PC和交换机,调试线一头接PC串口,一头接交换机CONSOLE接口
2、打开系统自带的超级终端(win7及以上系统需要下载)。运行超级终端程序,连接口设置com1(看连在哪个口,如果是COM2就设置成COM2,在电脑属性-设备管理器里查看)。
位率选择9600(一般是这个,如果更改了,就选择和更改一样的数值)
3、这样就登录到交换机设置界面了,输入用户名和密码登录(没设置是直接登录)
4、在设置界面输入以下命令
system
display current-configuration
就可以查看交换机当前配置信息了
1、重置DNS,打开开始菜单,找到“附件”,找到“附件”里边的“命令提示符”。2、以管理员身份运行命令提示符。
3、输入“ipconfig /flushdns”命令,重置DNS。
4、然后检查IE设置。打开IE,点击右上角工具。选择“Internet选项”。
5、点击“连接”选择“局域网设置”
6、在“使用自动配置脚本”前打勾“√”,然后点击确定即可。
7、若还是不行,重启Modem.若是通过路由器和Modem上网,则两者均断电重启即可。
Mininet教程摘要:
这里给出了Mininet在ubuntu 12.04 KVM (qemu 1.0)的环境下测试
提前准备:宿主机ubuntu + 虚拟机KVM(官方给出的镜像是vmdk vmware格式,教程中给出了vmdk到KVM镜像qcow2装换)
*** 作系统:ubuntu server amd64
安装完成后设置宿主机网络为
ubuntu@node2:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.12
gateway 192.168.1.1
netmask 255.255.255.0
auto eth1
iface eth1 inet manual
auto br0
iface br0 inet static
address 192.168.1.18
gateway 192.168.1.1
netmask 255.255.255.0
bridge_ports eth1
bridge_stp on
bridge_maxwait 0
重启网络服务,出现 br0网桥,这里假设有双网卡。单网卡也可以见后文。
然后安装 KVM
apt-get install -y kvm libvirt-bin
添加用户到libvirtd组
useradd $USER libvirtd
virsh net-destroy virtbr0 &&virsh net-undefine virbr0
然后重启libvirt-bin
service libvirt-bin restart
对于单网卡使用KVM桥接方式的的用户
brctl addbr br0
ifup br0
ifconfig br0 promisc
ifconfig br0 192.168.1.100 netmask 255.55.255.0 dev br0
就可以使用KVM桥接方式网桥br0
下载 mininet vmware镜像
wget https://github.com/downloads/mininet/mininet/mininet-2.0.0-113012-amd64-ovf.zip
转化镜像 vmware 格式到 kvm支持的格式
如果使用的是vmware workstation 略过
使用KVM 并且 qemu-img 版本1.0 报错
qemu-img convert -O qcow2 mininet-vm-disk1.vmdk mininet-vm-disk1.qcow2
报错
ubuntu@node2:~/vmimg/mininet-ovf$ qemu-img convert -O qcow2 mininet-vm-disk1.vmdk mininet-vm-disk1.qcow2
qemu-img: error while reading sector 131072: Invalid argument
ubuntu@node2:~/vmimg/mininet-ovf$ qemu-img convert -f vmdk -O qcow2 mininet-vm-disk1.vmdk mininet-vm-disk1.qcow2
qemu-img: error while reading sector 131072: Invalid argument
ubuntu@node2:~/vmimg/mininet-ovf$
conversion of a VMDK image with qemu-img failed with “error while reading sector 131072: Invalid argument”解决办法http://serverfault.com/questions/429478/conversion-of-a-vmdk-image-with-qemu-img-failed-with-error-while-reading-sector
原因是qemu的版本太低需要大于1. x
cd /tmp
apt-get install apt-get install libglib2.0-dev
wget http://wiki.qemu.org/download/qemu-1.2.0.tar.bz2
tar xf qemu-1.2.0.tar.bz2
cd qemu-1.2.0 &&./configure &&make -j16 (时间较长)
在/etc/libvirt/qemu/下创建mininet.xml(xml文件格式定义KVM镜像配置具体google "qemu syntax")
sudo cat mininet.xml
[sudo] password for ubuntu:
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh edit mininet
or other application using the libvirt API.
-->
<domain type='kvm'>
<name>mininet</name>
<uuid>3245e642-05dc-bd23-6d0e-e7582dc00660</uuid>
<memory>4194304</memory>
<currentMemory>4194304</currentMemory>
<vcpu cpuset='1,3,5,7,9,11,13,15'>4</vcpu>
<os>
<type arch='x86_64' machine='pc-1.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<cpu match='exact'>
<model>Westmere</model>
<vendor>Intel</vendor>
<feature policy='require' name='tm2'/>
<feature policy='require' name='est'/>
<feature policy='require' name='vmx'/>
<feature policy='require' name='ds'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='vme'/>
<feature policy='require' name='rdtscp'/>
<feature policy='require' name='ht'/>
<feature policy='require' name='dca'/>
<feature policy='require' name='pbe'/>
<feature policy='require' name='tm'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='ds_cpl'/>
<feature policy='require' name='xtpr'/>
<feature policy='require' name='acpi'/>
<feature policy='require' name='monitor'/>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/mininet-vm-disk1.qcow2'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
<interface type='bridge'>
<mac address='52:54:00:31:05:76'/>
<source bridge='br0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
<sound model='ich6'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</memballoon>
</devices>
</domain>
virsh create /etc/libvirt/qemu/mininet.xml
virsh consloe mininet
使用mininet:mininet
登陆修改
sudo ifconfig eth0 192.168.1.19 netmask 255.255.255.0 up
sudo route add default gw 192.168.1.1
sudo echo "nameserver 61.139.2.69" >/etc/resolv.conf
sudo echo "nameserver 61.139.2.69" >/etc/resolvconf/resolv.conf.d/base
账户 mininet
密码 mininet
配置静态IP
root@mininet-vm:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.19
gateway 192.168.1.1
netmask 255.255.255.0
root@mininet-vm:~#
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)