首页 > 系统相关 >ubuntu 添加/删除路由,traceroute

ubuntu 添加/删除路由,traceroute

时间:2022-09-19 14:56:56浏览次数:93  
标签:traceroute ip route installed add https ubuntu 路由

路由

add route

ip route add {NETWORK/MASK} via {GATEWAYIP}
ip route add {NETWORK/MASK} dev {DEVICE}
ip route add default {NETWORK/MASK} dev {DEVICE}
ip route add default {NETWORK/MASK} via {GATEWAYIP}

delete route

sudo route del -net 0.0.0.0 gw 192.168.178.1 netmask 0.0.0.0 dev eth0

show route

route -n
ip route show
ip r

路由表中 proto 的含义

             redirect - the route was installed due to an ICMP redirect.

             kernel - the route was installed by the kernel during
                   autoconfiguration.

             boot - the route was installed during the bootup sequence.
                 If a routing daemon starts, it will purge all of them.

             static - the route was installed by the administrator to
                   override dynamic routing. Routing daemon will
                   respect them and, probably, even advertise them
                   to its peers.

             ra - the route was installed by Router Discovery protocol.

其它项的具体解释可在 ip route 8 man page 找到

参考

https://www.cyberciti.biz/faq/ip-route-add-network-command-for-linux-explained/
https://serverfault.com/questions/181094/how-do-i-delete-a-route-from-linux-routing-table
https://stackoverflow.com/questions/10259266/what-does-proto-kernel-means-in-unix-routing-table

traceroute

traceroute 结果解读

  • !H 表示目标地址不可达
  • * 表示目标地址无回复
  • * * * 表示 traceroute 被防火墙阻挡

参考

https://networkengineering.stackexchange.com/questions/16454/difference-between-unresponsive-and-unreachable-h-hosts-in-traceroute-out
https://linux.die.net/man/8/traceroute
https://www.geeksforgeeks.org/how-to-read-a-traceroute/

标签:traceroute,ip,route,installed,add,https,ubuntu,路由
From: https://www.cnblogs.com/mrlonely2018/p/16707662.html

相关文章

  • buf connect-go 路由
    bufconnect-go的路由,只是利用了golanghttphandler的特性参考使用packagemain import("context""log""net/http" "g......
  • Ubuntu 20.04 使用 socat 转发特定端口
    安装socataptinstallsocat根据需求确定要转发的端口比如,我的需求是监听IPv6的某一TCP端口,并转发至局域网内某一特定主机,可以使用以下命令:socatTCP6-LISTEN:xxxx,fo......
  • Ubuntu samba的安装及使用方法
    Ubuntusamba的安装及使用方法说明本文仅在Ubuntu系统上进行了安装,centOS系统等存在一定差异,读者可参考其他资源进行分析安装sudoapt-getupdatesudoapt-getinstal......
  • Ubuntu 换源 国内源
    Ubuntu换源换源ubuntu的源存放在/etc/apt/source.list,在换源之前我们要记得对之前的源进行备份,这样的好处是,万一你不行,你还可以复原回去。脚本ubuntu有很多个版本,12.......
  • Ubuntu SSH服务端配置
    UbuntuSSH服务端配置SSH分客户端openssh-client和openssh-server如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudoapt-geti......
  • Ubuntu 切换到 root 用户
    Ubuntu安装之时没有设置root用户的密码?,甚至输入第一次创建用户的密码也是不可以的,所以不管怎么输入都是错误的。给root设置密码:切换root用户,输入正确的密码:命......
  • ubuntu笔记本自带麦克风有杂音
    sudovim/etc/pulse/default.pa然后在英文输入法下键入i,在文档最下方粘贴如下代码:#ActiveNoiseRemoval.ifexistsmodule-echo-cancel.soload-modulemodule-echo-c......
  • nodejs <a>带参数返回路由标记执行数据库操作
    今天在测试mongo数据库操作维护的时候,测试了一下直接在表内添加操作列来完成数据的删除操作,直接返回数据库ID1、mongo数据操作functiondelStudentid(id,callback){ ......
  • 树莓派3b+ ubuntu镜像配置国内软件源
    默认选择清华镜像https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/要注意网站说明:Ubuntu镜像使用帮助本镜像仅包含32/64位x86架构处理器的软件包,在ARM(arm64,......
  • 思科路由器特权密码的设置
    enablepassword这种方式是明文的。enablesecret是采用了MD5加密的。servicepassword-encryption这个加密的方式是采用了cisco的私有加密方式来加密的。所以我在设置了vt......