So I started booting the test board and then pulled up the docs on a different screen to learn how to setup a few basics. Skimming the docs I learned that they seem to have taken a lesson from the routing industry and have created a Command Line Interface similar to popular commercial routers. You can have different users with different privileges and then there are different modes for working in the router. The first mode is called “Operational Mode” which allows you to run basic utilities for diagnostics and show settings for troubleshooting. To set anything you need to enter the “Configuration Mode” with the command configure, which allows you to change and commit settings. We’ll hit that in a minute. First let’s login. Default credentials are root with a password of vyatta for your privileged user, and username vyatta with password of vyatta for your non-privileged user. Now let’s check our connectivity and see if we can talk to the network we are plugged into. Vyatta has the familiar tab completion for commands found in both UNIX systems and commercial routers, which helps you muttle your way through with minimal referencing of the docs. Logged in as the root user I did the following….. Last login: Fri Aug 8 01:28:13 2008 from 192.168.60.1 Linux vyatta 2.6.23-1-486-vyatta #1 SMP Sat Apr 19 12:37:43 PDT 2008 i686 Welcome to Vyatta. This system is open-source software. The exact distribution terms for each module comprising the full system are described in the individual files in /usr/share/doc/*/copyright. vyatta:~# show interfaces ethernet Interface IP Address State Link Description eth0 192.168.60.252/24 up up eth1 - up down vyatta:~# Now you can see in this terminal output that I already have an address, but it didn’t to start with, so I need to configure that…… vyatta:~# configure [edit] root@vyatta# set interfaces ethernet eth0 address dhcp [edit] root@vyatta# Ok so far so good. Now let’s setup ssh so we don’t need a monitor and keyboard attached to it. root@vyatta# set service ssh port 22 [edit] root@vyatta# set service ssh allow-root [edit] root@vyatta# commit There should be some text here about generating the ssh keys and restarting the service. root@vyatta# exit exit vyatta:~# Ok so now we should be able to login to this thing. Let’s go find the IP address and check the interface. vyatta:~# show interfaces ethernet detail eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:16:ec:54:fd:e8 brd ff:ff:ff:ff:ff:ff inet 192.168.60.252/24 brd 192.168.60.255 scope global eth0 inet6 fe80::216:ecff:fe54:fde8/64 scope link valid_lft forever preferred_lft forever RX: bytes packets errors dropped overrun mcast 76484 719 0 0 0 0 TX: bytes packets errors dropped carrier collisions 54652 443 0 0 0 0 eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:40:05:08:9e:26 brd ff:ff:ff:ff:ff:ff RX: bytes packets errors dropped overrun mcast 0 0 0 0 0 0 TX: bytes packets errors dropped carrier collisions 0 0 0 0 0 0 vyatta:~# Looks good to me. Now go ssh over to it and play. I will post more to come 1、准备工作 到vyatta网站下载软件http://www./download/,有两个版本可以下载,一个是iso版本,另一个是虚拟机版本。 2、安装系统 iso版本安装,将ISO文件通过nero刻录到光盘;然后进入CMOS设置为CDROM为第一启动设备,这需要你的机器真的拥有两块以上的网卡。 虚拟机版,直接在vmware中打开就可以可了,系统引导完毕后,将出现: vyatta login: root Password:vyatta ~ # 进入linux 的shell模式下 接着输入xorpsh,进入路由器配置模式。 root@vyatta> 如果, vyatta login: vyatta Password:vyatta 会直接进入路由配置模式。 3、配置路由器 我们需要实现的任务很简单,就是在路由器上做个nat,让藏在后面的多台pc可以共享上网。 将eth0作为外网口,eth1作为内网口,本人用的光电的小区宽带且分配的是私有IP网段:10.113.18.244。 常用的命令 配置缩略图: ![]() vyatta虚拟机安装 2007年02月25日 星期日 11:23
|
|
来自: Frank_Chia > 《网络》