From 124998b65a35dc5b8fe41cb33ca548ea7eb10514 Mon Sep 17 00:00:00 2001 From: Axel Colin de Verdiere Date: Thu, 6 Mar 2014 17:47:59 +0100 Subject: [PATCH 1/3] Added page for route under osx --- pages/osx/route.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pages/osx/route.md diff --git a/pages/osx/route.md b/pages/osx/route.md new file mode 100644 index 000000000..24dd02b75 --- /dev/null +++ b/pages/osx/route.md @@ -0,0 +1,20 @@ +# route + +> Manually manipulate the routing tables +> Necessitates to be root. + +- add a route to a destination through a gateway + +`sudo route add 10.0.0.0/8 192.168.1.1` + +- run in test mode (does not do anything, just print) + +`sudo route -t add 112.1.124.12/32 192.168.1.1` + +- remove all routes + +`sudo route flush` + +- delete a specific route + +`sudo route delete 10.0.0.0/24` From efc526f61b098535dec75c0b9ee462bb3c42760b Mon Sep 17 00:00:00 2001 From: Axel Colin de Verdiere Date: Fri, 7 Mar 2014 01:03:24 +0100 Subject: [PATCH 2/3] Added descriptive names for the arguments for route --- pages/osx/route.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/osx/route.md b/pages/osx/route.md index 24dd02b75..33cdc7082 100644 --- a/pages/osx/route.md +++ b/pages/osx/route.md @@ -5,11 +5,11 @@ - add a route to a destination through a gateway -`sudo route add 10.0.0.0/8 192.168.1.1` +`sudo route add {{dest_ip_address}} {{gateway_address}}` - run in test mode (does not do anything, just print) -`sudo route -t add 112.1.124.12/32 192.168.1.1` +`sudo route -t add {{dest_ip_address}}/24 {{gateway_address}}` - remove all routes @@ -17,4 +17,4 @@ - delete a specific route -`sudo route delete 10.0.0.0/24` +`sudo route delete {{dest_ip_address}}/24` From be239f7a9f9a1929aa2e0c58ce856209dbdfbf51 Mon Sep 17 00:00:00 2001 From: Axel Colin de Verdiere Date: Fri, 7 Mar 2014 14:34:37 +0100 Subject: [PATCH 3/3] Show a line with /24 subnet --- pages/osx/route.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/osx/route.md b/pages/osx/route.md index 33cdc7082..1408971d1 100644 --- a/pages/osx/route.md +++ b/pages/osx/route.md @@ -7,6 +7,10 @@ `sudo route add {{dest_ip_address}} {{gateway_address}}` +- add a route to a /24 subnet through a gateway + +`sudo route add {{subnet_ip_address}}/24 {{gateway_address}}` + - run in test mode (does not do anything, just print) `sudo route -t add {{dest_ip_address}}/24 {{gateway_address}}`