Showing posts with label networking. Show all posts
Showing posts with label networking. Show all posts

Friday, May 2, 2014

HTTP Status Codes

I can't always remember all the HTTP status Codes. I'm creating this blog post just to remember what they are. 



1xx: Informational - Request received, continuing process
2xx: Success - The action was successfully received, understood, and accepted
3xx: Redirection - Further action must be taken in order to complete the request
4xx: Client Error - The request contains bad syntax or cannot be fulfilled
5xx: Server Error - The server failed to fulfill an apparently valid request


While many of these are common (404, 200, 403) many are not and hard to remember. This list is modified from the wc3 and the wikipedia.


1xx informational

100
Client should continue with request

101
Server is switching protocols

102
Server has received and is processing the request

103
Resume aborted PUT or POST requests

122
URI is longer than a maximum of 2083 characters

2xx success

200
standard response for successful HTTP requests

201
request has been fulfilled; new resource created

202
Request accepted, processing pending

203
Request processed, information may be from another source

204
Request processed, no content returned

205
Request processed, no content returned, reset document view

206
Partial resource return due to request header

207
XML, can contain multiple separate responses

208
results previously returned

226
request fulfilled, response is instance-manipulations

3xx redirection

300
multiple options for the resource delivered

301
this and all future requests directed to the given URI

302
temporary response to request found via alternative URI

303
permanent response to request found via alternative URI

304
resource has not been modified since last requested

305
content located elsewhere, retrieve from there

306
subsequent requests should use the specified proxy

307
connect again to different URI as provided

308
connect again to a different URI using the same method

4xx client error

400
request cannot be fulfilled due to bad syntax

401
Authentication is possible but has failed

402
Payment required, reserved for future use

403
Server refuses to respond to request

404
Requested resource could not be found

405
Request method not supported by that resource

406
Content not acceptable according to the Accept headers

407
client must first authenticate itself with the proxy

408
server timed out waiting for the request

409
request could not be processed because of conflict

410
resource is no longer available and will not be available again

411
request did not specify the length of its content

412
server does not meet request preconditions

413
request is larger than the server is willing or able to process

414
URI provided was too long for the server to process

415
server does not support media type

416
Client has asked for unprovidable portion of the file

417
Server cannot meet requirements of Expect request-header field

420
Twitter rate limiting

422
Request unable to be followed due to semantic errors

423
Resource that is being accessed is locked

424
Request failed due to failure of a previous request

426
Client should switch to a different protocol

428
origin server requires the request to be conditional

429
user has sent too many requests in a given amount of time

431
server is unwilling to process the request

444
server returns no information and closes the connection

449
request should be retried after performing action

450
Windows Parental Controls blocking access to webpage

451
The server cannot reach the client's mailbox.

499
connection closed by client while HTTP server is processing

5xx server error

500
generic error message

501
server does not recognise method or lacks ability to fulfill

502
server received an invalid response from upstream server

503
server is currently unavailable

504
gateway did not receive response from upstream server

505
server does not support the HTTP protocol version

506
Content negotiation for the request results in a circular reference

507
Server is unable to store the representation

508
Server detected an infinite loop while processing the request

509
Bandwidth limit exceeded

510
Further extensions to the request are required

511
Client needs to authenticate to gain network access

598
network read timeout behind the proxy

599
network connect timeout behind the proxy


Thursday, February 27, 2014

How to Create F5 Monitor, Node, Pool, and Virtual Server


 
Part I: Create Monitor  
  1. Login to F5 ( open additional tab, if needed, to copy settings from another item) 
  2. Create Monitor (for SomeApp) as needed, only need 1 monitor per app, not env. 
  3. Click on Monitor > +   
  4. On General Properties page, enter Name, Description, Type ( choose HTTP) 
  5. Under  Configuration in the Send String section, add the following 
    1. GET /<appname>/healthcheck\r\n 
  6. On Receive String section add Health: OK 
  7. Leave rest at default settings and click Finished  
Part II: Create Node (as needed)  
  1. To create new node, click on Local Traffic > Nodes > Node List > + 
  2. Fill in the following information in the General Properties section 
    1. NameServer short hostname, ie devXXX 
    2. Address:  IP Address for node, ie 192.168.100.X 
    3. Description:  <hostname> <appname> ie srvXXX-Application1 
  3. In the Configuration Section, fill in the following 
    1. Health Monitor:  Node Specific 
    2. Select Monitor:  Choose icmp from available list and move to Active 
    3. Leave rest of settings at default and click on Finished  
Part III:  Create Pool  
  1. To create new Pool, click on Local Traffic > Pools > Pool List + 
  2. Fill in the following information in the Configuration Section 
    1. Note: SomeApp uses <env>service_<app>_<port> as name and ports start at somePort# and increase by XX.  
    2. example for app tmsdevservice_app_port#    
    3. Name<env>service_app_port 
    4. Description<Env> Web Service SomeApp <App> 
    5. Health Monitors:  Add http1.1 or Health Check for App (if they have it) to Active 
  3. In the Resources section add the following information 
    1. Load Balancing: Leave as default Round Robin 
    2. Click on Node List and add Node you created above in Part II 
    3. Set the service port, usually 8080 for tomcat. 
    4. Click Add then click Finished 

Part IV: Create Virtual Server   
  1. Create new Virtual Server, click on Virtual Servers > Virtual Server List + button 
  2. Fill in the following information in the General Properties section. 
    1. NOTE:  name follows same format as Pool name for service, ie <env>service_<app>_<port> 
    2. Name:  <env>devservice_<app>_<port> 
    3. Description: ENV APP VIP 
    4. Source: 0.0.0.0/0 
    5. Destination: IP Address assigned  for VIP, see wiki 
      1. 192.168.100.200 (for dev) 
  3. Fill in the following information for Configuration (Click Advanced) 
    1. Leave all as default unless specified below 
    2. Protocol profile (Client) :              service-tcp-profile 
    3. HTTP Profile:     http-xfwd 
    4. VLANS and Tunnels                         
      1. Enabled On 
      2. Select vlan123 
  4. Fill in the following information for the Resources section 
    1. Default Pool: Choose the Pool Created above to match the app 
    2. Click on Finished to complete 

Part V: Sync Configuration   
  1. To sync configuration to second f5 node click on ‘Changes Pending’ in upper left of browser 
  2. Click on the (self) f5 that you are working on under the Devices section 
  3. Make sure Sync Device to Group is selected under Sync Options 
  4. Click on Sync    
  5. Repeat all steps above for each environment and sync afterwards. 

Tuesday, January 21, 2014

Basic Cisco Commands

Information about Basic Cisco Admin Tasks 
This document describes many of the common and very basic Cisco tasks an admin will perform.  
 
Some Basic Tasks 
  • Configuring interface/port 
  • Enable port/int 
  • Configure Wireless LAN Controller AP speed and duplex  
Very Basic Cisco Commands  
  • To show status of interface and other info  
    • show int status mod X (where X=module or blade number)  
  • show int status module 4 | inc 41  (to show port 41) 
    • show int gX/XX (where X=module, XX=port number)  
  • int g7/2 
    • show run int int 
  • Check interface status with "sh int g#/#" where the letter is the interface type (g=gigabit, f=fastethernet) and the #'s are the module/port  
  • Change port/interface configuration  
  • To change description:  
    • switch#configure terminal switch(config)#interface fa0/1 switch(config-if)#description “This is 1st Port of My Switch” switch(config-if)#end switch#  
    • To remove: no description  
  • select range of ports to configure  
    • switch# config t  
    • switch(config)#int range gi1/1 - 24 
  • To change speed,etc..  
    • switch# config t switch(config) int gx/x switch(config) speed 100 switch(config) duplex full switch(config) end 
  • to enable port  
    • switch# config t switch(config) interface gX/XX switch(config) no shutdown switch(config) end 
  • to disable port  
    • switch# config t switch(config) interface gX/XX switch(config-if) no description switch(config-if) switchport access vlan 1 switch(config-if) shutdown switch(config-if) end 
  • to set vlan on interface  
    • Enter configuration commands, one per line.  End with CNTL/Z. site1_CORE_6509_2(config)#int g4/40 site1_CORE_6509_2(config-if)#switchport access vlan 850 site1_CORE_6509_2(config-if)#end site1_CORE_6509_2#show int status mod 4 | inc 40 Gi4/40       "site1_ilbl_e45 connected    850        a-full  a-100 10/100/1000BaseT 
  • To save backup and write current  
    • [optional] Backup your old configuration switch#copy startup-config startup-config.241207 
    • Save your running configuration (so that it will start at boot) switch#copy running-config startup-config 
  • To resest module or 'blade'  
    • type hw-module module 12 reset 
  • To see other cisco devices attached to specific equipment use "sh cdp neigh"  
    • for additional details on a specific device you see use "sh cdp neigh g#/# detail" where the g#/# is the interface of the device you are logged onto for the deive you want to look at. 
  • Check your root bridge for vlans with "sh spanning-tree root"  
  • Check the HSRP state of your sup engines with "sh redundancy"  
  • Check how your traffic is routing with "sh ip route", use the "| inc 10.xx." to check for specific routes  
  • Check the active HSRP route for specific vlans with "sh standby brief"  
  • Find the port a specific mac address is on, use "sh mac-add | inc xxxx" where xxxx is the last 4 of the mac address.  
  • Find what mac addresses are on a specific port, use "sh mac-add int Gx/xx" where gx/x if the interface you want to look at (g1/14 would be a gig port on module 1, interface 14)  
  • To restart a module and bring it back online use "hw-module module # reset".  
  • Tell the switch to restart at a later time  
    • switch# reload at mmm or hhh:mmm or switch# reload in mmm 
  • To Configure a Wireless LAN Controller Access Point speed and duplex.  
    • Login to the WLC through Putty and issue the command "config ap ethernet duplex full speed 100 site1-WAP_Name_1"