vyos常用命令

本文介绍了VyOS路由器的基本配置,包括使用DHCP获取IP地址、启用SSH服务、设置DNS、配置静态路由以及解决无法通过pip安装软件的问题。通过这些步骤,可以对VyOS进行基本的网络管理。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、配置eth0用dhcp获取ip地址
set interfaces ethernet eth0 address ‘dhcp’

2、开启ssh
vyos@vyos# set service ssh port ‘22’

3、开启dns
set system name-server 114.114.114.114

4、配置静态路由
#配置外网接口
set interfaces ethernet eth0 address 192.168.8.161/24
set interfaces ethernet eth0 description public
set protocols static route 0.0.0.0/0 next-hop 192.168.8.1

5、有些时候,用pip install 不行,是因为没有配置dns.

 Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fef598848d0>: Failed to establish a new connection: [Errno -3] \xe5\x9f\x9f\xe5\x90\x8d\xe8\xa7\xa3\xe6\x9e\x90\xe6\x9a\x82\xe6\x97\xb6\xe5\xa4\xb1\xe8\xb4\xa5',)': /packages/60/8e/cdcc5c8c97dc4d591dc96b6f452f31393fc1393bd1f37d2819bcce9d0d57/ChatterBot-0.8.7-py2.py3-none-any.whl
  Retrying 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值